Lines Matching refs:encoder

37 		int options, php_json_encoder *encoder);
80 …void php_json_pretty_print_indent(smart_str *buf, int options, php_json_encoder *encoder) /* {{{ */ in php_json_pretty_print_indent() argument
85 for (i = 0; i < encoder->depth; ++i) { in php_json_pretty_print_indent()
130 static int php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_array() argument
145 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_array()
159 ++encoder->depth; in php_json_encode_array()
177 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
192 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
195 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
209 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
220 if (php_json_encode_zval(buf, data, options, encoder) == FAILURE && in php_json_encode_array()
231 if (encoder->depth > encoder->max_depth) { in php_json_encode_array()
232 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
238 --encoder->depth; in php_json_encode_array()
243 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
259 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
332 encoder->error_code = PHP_JSON_ERROR_UTF8; in php_json_escape_string()
471 …de_serializable_object(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ */ in php_json_encode_serializable_object() argument
479 encoder->error_code = PHP_JSON_ERROR_RECURSION; 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
557 encoder->error_code = PHP_JSON_ERROR_INF_OR_NAN; 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()
586 encoder->error_code = PHP_JSON_ERROR_UNSUPPORTED_TYPE; in php_json_encode_zval()