Lines Matching refs:options

48 static inline void php_json_pretty_print_char(smart_str *buf, int options, char c) /* {{{ */  in php_json_pretty_print_char()  argument
50 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_char()
56 static inline void php_json_pretty_print_indent(smart_str *buf, int options, php_json_encoder *enco… in php_json_pretty_print_indent() argument
60 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_indent()
76 static inline void php_json_encode_double(smart_str *buf, double d, int options) /* {{{ */ in php_json_encode_double() argument
83 …if (options & PHP_JSON_PRESERVE_ZERO_FRACTION && strchr(num, '.') == NULL && len < ZEND_DOUBLE_MAX… in php_json_encode_double()
106 static int php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_array() argument
114 …r = (options & PHP_JSON_FORCE_OBJECT) ? PHP_JSON_OUTPUT_OBJECT : php_json_determine_array_type(val… in php_json_encode_array()
157 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
158 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
161 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
162 (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) && in php_json_encode_array()
169 php_json_pretty_print_char(buf, options, ' '); in php_json_encode_array()
171 if (php_json_encode_zval(buf, prop, options, encoder) == FAILURE && in php_json_encode_array()
172 !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
181 if (!(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
188 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
189 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
230 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
231 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
245 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
246 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
249 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
250 (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) && in php_json_encode_array()
262 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
263 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
271 php_json_pretty_print_char(buf, options, ' '); in php_json_encode_array()
274 if (php_json_encode_zval(buf, data, options, encoder) == FAILURE && in php_json_encode_array()
275 !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
287 if (!(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
296 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
297 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
313 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
325 if (options & PHP_JSON_NUMERIC_CHECK) { in php_json_escape_string()
335 php_json_encode_double(buf, d, options); in php_json_escape_string()
375 if (options & PHP_JSON_INVALID_UTF8_IGNORE) { in php_json_escape_string()
377 } else if (options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) { in php_json_escape_string()
379 if (options & PHP_JSON_UNESCAPED_UNICODE) { in php_json_escape_string()
387 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_escape_string()
396 } else if ((options & PHP_JSON_UNESCAPED_UNICODE) in php_json_escape_string()
397 && ((options & PHP_JSON_UNESCAPED_LINE_TERMINATORS) in php_json_escape_string()
432 if (options & PHP_JSON_HEX_QUOT) { in php_json_escape_string()
444 if (options & PHP_JSON_UNESCAPED_SLASHES) { in php_json_escape_string()
472 if (options & PHP_JSON_HEX_TAG) { in php_json_escape_string()
480 if (options & PHP_JSON_HEX_TAG) { in php_json_escape_string()
488 if (options & PHP_JSON_HEX_AMP) { in php_json_escape_string()
496 if (options & PHP_JSON_HEX_APOS) { in php_json_escape_string()
525 static int php_json_encode_serializable_object(smart_str *buf, zval *val, int options, php_json_enc… in php_json_encode_serializable_object() argument
534 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
550 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
562 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
573 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
576 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
587 static int php_json_encode_serializable_enum(smart_str *buf, zval *val, int options, php_json_encod… in php_json_encode_serializable_enum() argument
597 return php_json_encode_zval(buf, value_zv, options, encoder); in php_json_encode_serializable_enum()
600 int php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ … in php_json_encode_zval() argument
622 php_json_encode_double(buf, Z_DVAL_P(val), options); in php_json_encode_zval()
630 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
634 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
637 return php_json_encode_serializable_enum(buf, val, options, encoder); in php_json_encode_zval()
647 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
658 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_zval()