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
266 if (options & PHP_JSON_NUMERIC_CHECK) { in php_json_escape_string()
276 php_json_encode_double(buf, d, options); in php_json_escape_string()
304 if (options & PHP_JSON_INVALID_UTF8_IGNORE) { in php_json_escape_string()
307 } else if (options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) { in php_json_escape_string()
309 if (options & PHP_JSON_UNESCAPED_UNICODE) { in php_json_escape_string()
318 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_escape_string()
327 } else if ((options & PHP_JSON_UNESCAPED_UNICODE) in php_json_escape_string()
328 && ((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()
471 static int php_json_encode_serializable_object(smart_str *buf, zval *val, int options, php_json_enc… in php_json_encode_serializable_object() argument
480 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
496 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
508 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_serializable_object()
519 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
522 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
533 int php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ … in php_json_encode_zval() argument
555 php_json_encode_double(buf, Z_DVAL_P(val), options); in php_json_encode_zval()
563 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
567 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
576 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
587 if (options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { in php_json_encode_zval()