Lines Matching refs:options
37 int options, php_json_encoder *encoder);
72 static inline void php_json_pretty_print_char(smart_str *buf, int options, char c) /* {{{ */ in php_json_pretty_print_char() argument
74 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_char()
80 static inline void php_json_pretty_print_indent(smart_str *buf, int options, php_json_encoder *enco… in php_json_pretty_print_indent() argument
84 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_indent()
100 static inline void php_json_encode_double(smart_str *buf, double d, int options) /* {{{ */ in php_json_encode_double() argument
107 …if (options & PHP_JSON_PRESERVE_ZERO_FRACTION && strchr(num, '.') == NULL && len < PHP_DOUBLE_MAX_… in php_json_encode_double()
130 static int php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_array() argument
137 …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()
230 if (!(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in php_json_encode_array()
238 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
239 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
254 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
265 if (options & PHP_JSON_NUMERIC_CHECK) { in php_json_escape_string()
275 php_json_encode_double(buf, d, options); in php_json_escape_string()
298 if (options & PHP_JSON_INVALID_UTF8_IGNORE) { in php_json_escape_string()
301 } else if (options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) { in php_json_escape_string()
310 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_escape_string()
320 if ((options & PHP_JSON_UNESCAPED_UNICODE) in php_json_escape_string()
321 && ((options & PHP_JSON_UNESCAPED_LINE_TERMINATORS) in php_json_escape_string()
358 if (options & PHP_JSON_HEX_QUOT) { in php_json_escape_string()
370 if (options & PHP_JSON_UNESCAPED_SLASHES) { in php_json_escape_string()
398 if (options & PHP_JSON_HEX_TAG) { in php_json_escape_string()
406 if (options & PHP_JSON_HEX_TAG) { in php_json_escape_string()
414 if (options & PHP_JSON_HEX_AMP) { in php_json_escape_string()
422 if (options & PHP_JSON_HEX_APOS) { in php_json_escape_string()
446 static int php_json_encode_serializable_object(smart_str *buf, zval *val, int options, php_json_enc… in php_json_encode_serializable_object() argument
455 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
471 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
483 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
494 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
497 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
508 int php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ … in php_json_encode_zval() argument
530 php_json_encode_double(buf, Z_DVAL_P(val), options); in php_json_encode_zval()
538 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
542 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
551 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
562 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_zval()