Lines Matching refs:encoder
116 php_json_encoder encoder; in php_json_encode_string() local
118 php_json_encode_init(&encoder); in php_json_encode_string()
120 if (php_json_escape_string(&buf, s, len, options, &encoder) == FAILURE) { in php_json_encode_string()
130 php_json_encoder encoder; in php_json_encode_ex() local
133 php_json_encode_init(&encoder); in php_json_encode_ex()
134 encoder.max_depth = depth; in php_json_encode_ex()
136 return_code = php_json_encode_zval(buf, val, options, &encoder); in php_json_encode_ex()
137 JSON_G(error_code) = encoder.error_code; in php_json_encode_ex()
225 php_json_encoder encoder; in PHP_FUNCTION() local
237 php_json_encode_init(&encoder); in PHP_FUNCTION()
238 encoder.max_depth = (int)depth; in PHP_FUNCTION()
239 php_json_encode_zval(&buf, parameter, (int)options, &encoder); in PHP_FUNCTION()
242 JSON_G(error_code) = encoder.error_code; in PHP_FUNCTION()
243 if (encoder.error_code != PHP_JSON_ERROR_NONE && !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { in PHP_FUNCTION()
248 if (encoder.error_code != PHP_JSON_ERROR_NONE) { in PHP_FUNCTION()
250 …zend_throw_exception(php_json_exception_ce, php_json_get_error_msg(encoder.error_code), encoder.er… in PHP_FUNCTION()