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()
106 static int php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_array() argument
126 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_array()
135 ++encoder->depth; in php_json_encode_array()
158 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
161 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
171 if (php_json_encode_zval(buf, prop, options, encoder) == FAILURE && in php_json_encode_array()
179 if (encoder->depth > encoder->max_depth) { in php_json_encode_array()
180 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
185 --encoder->depth; in php_json_encode_array()
189 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
199 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_array()
213 ++encoder->depth; in php_json_encode_array()
231 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
246 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
249 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
263 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
274 if (php_json_encode_zval(buf, data, options, encoder) == FAILURE && in php_json_encode_array()
285 if (encoder->depth > encoder->max_depth) { in php_json_encode_array()
286 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
292 --encoder->depth; in php_json_encode_array()
297 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
313 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
386 encoder->error_code = PHP_JSON_ERROR_UTF8; in php_json_escape_string()
525 …de_serializable_object(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ */ in php_json_encode_serializable_object() argument
533 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_serializable_object()
573 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
576 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
587 …hp_json_encode_serializable_enum(smart_str *buf, zval *val, int options, php_json_encoder *encoder) in php_json_encode_serializable_enum() argument
591 encoder->error_code = PHP_JSON_ERROR_NON_BACKED_ENUM; in php_json_encode_serializable_enum()
597 return php_json_encode_zval(buf, value_zv, options, encoder); in php_json_encode_serializable_enum()
600 int php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ … in php_json_encode_zval() argument
624 encoder->error_code = PHP_JSON_ERROR_INF_OR_NAN; in php_json_encode_zval()
630 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
634 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
637 return php_json_encode_serializable_enum(buf, val, options, encoder); in php_json_encode_zval()
647 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
657 encoder->error_code = PHP_JSON_ERROR_UNSUPPORTED_TYPE; in php_json_encode_zval()