Lines Matching refs:options
58 static inline void php_json_pretty_print_char(smart_str *buf, int options, char c) /* {{{ */ in php_json_pretty_print_char() argument
60 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_char()
66 static inline void php_json_pretty_print_indent(smart_str *buf, int options, php_json_encoder *enco… in php_json_pretty_print_indent() argument
70 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_indent()
93 static inline void php_json_encode_double(smart_str *buf, double d, int options) /* {{{ */ in php_json_encode_double() argument
100 …if (options & PHP_JSON_PRESERVE_ZERO_FRACTION && strchr(num, '.') == NULL && len < ZEND_DOUBLE_MAX… in php_json_encode_double()
123 static zend_result php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *… in php_json_encode_array() argument
131 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_array()
141 …r = (options & PHP_JSON_FORCE_OBJECT) ? PHP_JSON_OUTPUT_OBJECT : php_json_determine_array_type(val… in php_json_encode_array()
185 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
186 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
189 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
190 (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) && in php_json_encode_array()
197 php_json_pretty_print_char(buf, options, ' '); in php_json_encode_array()
199 if (php_json_encode_zval(buf, prop, options, encoder) == FAILURE && in php_json_encode_array()
200 !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
209 if (!(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
216 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
217 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
271 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
272 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
301 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
302 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
305 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
306 (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) && in php_json_encode_array()
318 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
319 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
327 php_json_pretty_print_char(buf, options, ' '); in php_json_encode_array()
330 if (php_json_encode_zval(buf, data, options, encoder) == FAILURE && in php_json_encode_array()
331 !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
345 if (!(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
354 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
355 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
371 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
382 if (options & PHP_JSON_NUMERIC_CHECK) { in php_json_escape_string()
392 php_json_encode_double(buf, d, options); in php_json_escape_string()
432 if (options & PHP_JSON_INVALID_UTF8_IGNORE) { in php_json_escape_string()
434 } else if (options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) { in php_json_escape_string()
436 if (options & PHP_JSON_UNESCAPED_UNICODE) { in php_json_escape_string()
444 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_escape_string()
453 } else if ((options & PHP_JSON_UNESCAPED_UNICODE) in php_json_escape_string()
454 && ((options & PHP_JSON_UNESCAPED_LINE_TERMINATORS) in php_json_escape_string()
489 if (options & PHP_JSON_HEX_QUOT) { in php_json_escape_string()
501 if (options & PHP_JSON_UNESCAPED_SLASHES) { in php_json_escape_string()
529 if (options & PHP_JSON_HEX_TAG) { in php_json_escape_string()
537 if (options & PHP_JSON_HEX_TAG) { in php_json_escape_string()
545 if (options & PHP_JSON_HEX_AMP) { in php_json_escape_string()
553 if (options & PHP_JSON_HEX_APOS) { in php_json_escape_string()
582 static zend_result php_json_encode_serializable_object(smart_str *buf, zval *val, int options, php_… in php_json_encode_serializable_object() argument
594 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
610 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
622 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
633 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
636 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
647 static zend_result php_json_encode_serializable_enum(smart_str *buf, zval *val, int options, php_js… in php_json_encode_serializable_enum() argument
657 return php_json_encode_zval(buf, value_zv, options, encoder); in php_json_encode_serializable_enum()
660 zend_result php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_zval() argument
682 php_json_encode_double(buf, Z_DVAL_P(val), options); in php_json_encode_zval()
690 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
694 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
697 return php_json_encode_serializable_enum(buf, val, options, encoder); in php_json_encode_zval()
707 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
718 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_zval()