Lines Matching refs:options
35 int options, php_json_encoder *encoder);
70 static inline void php_json_pretty_print_char(smart_str *buf, int options, char c) /* {{{ */ in php_json_pretty_print_char() argument
72 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_char()
78 static inline void php_json_pretty_print_indent(smart_str *buf, int options, php_json_encoder *enco… in php_json_pretty_print_indent() argument
82 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_indent()
98 static inline void php_json_encode_double(smart_str *buf, double d, int options) /* {{{ */ in php_json_encode_double() argument
105 …if (options & PHP_JSON_PRESERVE_ZERO_FRACTION && strchr(num, '.') == NULL && len < PHP_DOUBLE_MAX_… in php_json_encode_double()
128 static int php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_array() argument
136 …r = (options & PHP_JSON_FORCE_OBJECT) ? PHP_JSON_OUTPUT_OBJECT : php_json_determine_array_type(val… in php_json_encode_array()
174 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
175 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
189 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
190 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
193 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
194 (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) && in php_json_encode_array()
206 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
207 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
215 php_json_pretty_print_char(buf, options, ' '); in php_json_encode_array()
218 if (php_json_encode_zval(buf, data, options, encoder) == FAILURE && in php_json_encode_array()
219 !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
231 if (!(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
240 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
241 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
257 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
269 if (options & PHP_JSON_NUMERIC_CHECK) { in php_json_escape_string()
279 php_json_encode_double(buf, d, options); in php_json_escape_string()
319 if (options & PHP_JSON_INVALID_UTF8_IGNORE) { in php_json_escape_string()
321 } else if (options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) { in php_json_escape_string()
323 if (options & PHP_JSON_UNESCAPED_UNICODE) { in php_json_escape_string()
331 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_escape_string()
340 } else if ((options & PHP_JSON_UNESCAPED_UNICODE) in php_json_escape_string()
341 && ((options & PHP_JSON_UNESCAPED_LINE_TERMINATORS) in php_json_escape_string()
376 if (options & PHP_JSON_HEX_QUOT) { in php_json_escape_string()
388 if (options & PHP_JSON_UNESCAPED_SLASHES) { in php_json_escape_string()
416 if (options & PHP_JSON_HEX_TAG) { in php_json_escape_string()
424 if (options & PHP_JSON_HEX_TAG) { in php_json_escape_string()
432 if (options & PHP_JSON_HEX_AMP) { in php_json_escape_string()
440 if (options & PHP_JSON_HEX_APOS) { in php_json_escape_string()
469 static int php_json_encode_serializable_object(smart_str *buf, zval *val, int options, php_json_enc… in php_json_encode_serializable_object() argument
478 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
494 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
506 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
517 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
520 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
531 int php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ … in php_json_encode_zval() argument
553 php_json_encode_double(buf, Z_DVAL_P(val), options); in php_json_encode_zval()
561 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
565 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
574 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
585 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_zval()