Lines Matching refs:encoder
35 int options, php_json_encoder *encoder);
78 …void php_json_pretty_print_indent(smart_str *buf, int options, php_json_encoder *encoder) /* {{{ */ in php_json_pretty_print_indent() argument
83 for (i = 0; i < encoder->depth; ++i) { in php_json_pretty_print_indent()
128 static int php_json_encode_array(smart_str *buf, zval *val, int options, php_json_encoder *encoder)… in php_json_encode_array() argument
143 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_array()
157 ++encoder->depth; in php_json_encode_array()
175 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
190 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
193 options & ~PHP_JSON_NUMERIC_CHECK, encoder) == FAILURE && in php_json_encode_array()
207 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
218 if (php_json_encode_zval(buf, data, options, encoder) == FAILURE && in php_json_encode_array()
229 if (encoder->depth > encoder->max_depth) { in php_json_encode_array()
230 encoder->error_code = PHP_JSON_ERROR_DEPTH; in php_json_encode_array()
236 --encoder->depth; in php_json_encode_array()
241 php_json_pretty_print_indent(buf, options, encoder); in php_json_encode_array()
257 int options, php_json_encoder *encoder) /* {{{ */ in php_json_escape_string() argument
330 encoder->error_code = PHP_JSON_ERROR_UTF8; in php_json_escape_string()
469 …de_serializable_object(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ */ in php_json_encode_serializable_object() argument
477 encoder->error_code = PHP_JSON_ERROR_RECURSION; in php_json_encode_serializable_object()
517 return_code = php_json_encode_array(buf, &retval, options, encoder); in php_json_encode_serializable_object()
520 return_code = php_json_encode_zval(buf, &retval, options, encoder); in php_json_encode_serializable_object()
531 int php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder) /* {{{ … in php_json_encode_zval() argument
555 encoder->error_code = PHP_JSON_ERROR_INF_OR_NAN; in php_json_encode_zval()
561 return php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options, encoder); in php_json_encode_zval()
565 return php_json_encode_serializable_object(buf, val, options, encoder); in php_json_encode_zval()
574 res = php_json_encode_array(buf, &zv, options, encoder); in php_json_encode_zval()
584 encoder->error_code = PHP_JSON_ERROR_UNSUPPORTED_TYPE; in php_json_encode_zval()