Lines Matching refs:encoder

65 …void php_json_pretty_print_indent(smart_str *buf, int options, php_json_encoder *encoder) /* {{{ */  in php_json_pretty_print_indent()  argument
70 for (i = 0; i < encoder->depth; ++i) { in php_json_pretty_print_indent()
122 … php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ */ in php_json_encode_array() argument
128 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
150 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_array()
159 ++encoder->depth; in php_json_encode_array()
182 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
185 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
195 if (php_json_encode_zval(buf, prop, options, encoder) == FAILURE && in php_json_encode_array()
203 if (encoder->depth > encoder->max_depth) { in php_json_encode_array()
204 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
209 --encoder->depth; in php_json_encode_array()
213 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
223 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_array()
237 ++encoder->depth; in php_json_encode_array()
255 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
270 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
273 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
287 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
298 if (php_json_encode_zval(buf, data, options, encoder) == FAILURE && in php_json_encode_array()
309 if (encoder->depth > encoder->max_depth) { in php_json_encode_array()
310 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
316 --encoder->depth; in php_json_encode_array()
321 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
337 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
409 encoder->error_code = PHP_JSON_ERROR_UTF8; in php_json_escape_string()
548 …de_serializable_object(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ */ in php_json_encode_serializable_object() argument
559 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_serializable_object()
599 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
602 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
613 …hp_json_encode_serializable_enum(smart_str *buf, zval *val, int options, php_json_encoder *encoder) in php_json_encode_serializable_enum() argument
617 encoder->error_code = PHP_JSON_ERROR_NON_BACKED_ENUM; in php_json_encode_serializable_enum()
623 return php_json_encode_zval(buf, value_zv, options, encoder); in php_json_encode_serializable_enum()
626 zend_result php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_zval() argument
650 encoder->error_code = PHP_JSON_ERROR_INF_OR_NAN; in php_json_encode_zval()
656 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
660 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
663 return php_json_encode_serializable_enum(buf, val, options, encoder); in php_json_encode_zval()
673 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
683 encoder->error_code = PHP_JSON_ERROR_UNSUPPORTED_TYPE; in php_json_encode_zval()