Lines Matching refs:options
44 static void php_json_escape_string(smart_str *buf, char *s, size_t len, int options);
75 static inline void php_json_pretty_print_char(smart_str *buf, int options, char c) /* {{{ */ in php_json_pretty_print_char() argument
77 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_char()
83 static inline void php_json_pretty_print_indent(smart_str *buf, int options) /* {{{ */ in php_json_pretty_print_indent() argument
87 if (options & PHP_JSON_PRETTY_PRINT) { in php_json_pretty_print_indent()
103 static inline void php_json_encode_double(smart_str *buf, double d, int options) /* {{{ */ in php_json_encode_double() argument
109 …if (options & PHP_JSON_PRESERVE_ZERO_FRACTION && strchr(num, '.') == NULL && len < PHP_JSON_DOUBLE… in php_json_encode_double()
118 static void php_json_encode_array(smart_str *buf, zval *val, int options) /* {{{ */ in php_json_encode_array() argument
125 …r = (options & PHP_JSON_FORCE_OBJECT) ? PHP_JSON_OUTPUT_OBJECT : php_json_determine_array_type(val… in php_json_encode_array()
167 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
168 php_json_pretty_print_indent(buf, options); in php_json_encode_array()
169 php_json_encode(buf, data, options); in php_json_encode_array()
186 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
187 php_json_pretty_print_indent(buf, options); in php_json_encode_array()
189 php_json_escape_string(buf, ZSTR_VAL(key), ZSTR_LEN(key), options & ~PHP_JSON_NUMERIC_CHECK); in php_json_encode_array()
192 php_json_pretty_print_char(buf, options, ' '); in php_json_encode_array()
194 php_json_encode(buf, data, options); in php_json_encode_array()
202 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
203 php_json_pretty_print_indent(buf, options); in php_json_encode_array()
210 php_json_pretty_print_char(buf, options, ' '); in php_json_encode_array()
212 php_json_encode(buf, data, options); in php_json_encode_array()
229 php_json_pretty_print_char(buf, options, '\n'); in php_json_encode_array()
230 php_json_pretty_print_indent(buf, options); in php_json_encode_array()
278 static void php_json_escape_string(smart_str *buf, char *s, size_t len, int options) /* {{{ */ in php_json_escape_string() argument
289 if (options & PHP_JSON_NUMERIC_CHECK) { in php_json_escape_string()
299 php_json_encode_double(buf, d, options); in php_json_escape_string()
306 if (options & PHP_JSON_UNESCAPED_UNICODE) { in php_json_escape_string()
324 if (us >= 0x80 && !(options & PHP_JSON_UNESCAPED_UNICODE)) { 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 void php_json_encode_serializable_object(smart_str *buf, zval *val, int options) /* {{{ */ in php_json_encode_serializable_object() argument
490 php_json_encode_array(buf, &retval, options); in php_json_encode_serializable_object()
493 php_json_encode(buf, &retval, options); in php_json_encode_serializable_object()
501 void php_json_encode_zval(smart_str *buf, zval *val, int options) /* {{{ */ in php_json_encode_zval() argument
523 php_json_encode_double(buf, Z_DVAL_P(val), options); in php_json_encode_zval()
531 php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options); in php_json_encode_zval()
536 php_json_encode_serializable_object(buf, val, options); in php_json_encode_zval()
541 php_json_encode_array(buf, val, options); in php_json_encode_zval()