Lines Matching refs:encoder

56 …void php_json_pretty_print_indent(smart_str *buf, int options, php_json_encoder *encoder) /* {{{ */  in php_json_pretty_print_indent()  argument
61 for (i = 0; i < encoder->depth; ++i) { in php_json_pretty_print_indent()
113 … php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ */ in php_json_encode_array() argument
133 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_array()
142 ++encoder->depth; in php_json_encode_array()
165 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
168 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
178 if (php_json_encode_zval(buf, prop, options, encoder) == FAILURE && in php_json_encode_array()
186 if (encoder->depth > encoder->max_depth) { in php_json_encode_array()
187 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
192 --encoder->depth; in php_json_encode_array()
196 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
206 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_array()
220 ++encoder->depth; in php_json_encode_array()
238 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
253 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
256 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
270 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
281 if (php_json_encode_zval(buf, data, options, encoder) == FAILURE && in php_json_encode_array()
292 if (encoder->depth > encoder->max_depth) { in php_json_encode_array()
293 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
299 --encoder->depth; in php_json_encode_array()
304 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
320 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
392 encoder->error_code = PHP_JSON_ERROR_UTF8; in php_json_escape_string()
531 …de_serializable_object(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ */ in php_json_encode_serializable_object() argument
539 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_serializable_object()
579 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
582 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
593 …hp_json_encode_serializable_enum(smart_str *buf, zval *val, int options, php_json_encoder *encoder) in php_json_encode_serializable_enum() argument
597 encoder->error_code = PHP_JSON_ERROR_NON_BACKED_ENUM; in php_json_encode_serializable_enum()
603 return php_json_encode_zval(buf, value_zv, options, encoder); in php_json_encode_serializable_enum()
606 zend_result php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_zval() argument
630 encoder->error_code = PHP_JSON_ERROR_INF_OR_NAN; in php_json_encode_zval()
636 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
640 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
643 return php_json_encode_serializable_enum(buf, val, options, encoder); in php_json_encode_zval()
653 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
663 encoder->error_code = PHP_JSON_ERROR_UNSUPPORTED_TYPE; in php_json_encode_zval()