php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_json_encoder.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Jakub Zelenka <bukka@php.net> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef PHP_JSON_ENCODER_H
18#define PHP_JSON_ENCODER_H
19
20#include "php.h"
21#include "zend_smart_str.h"
22
24
30
31static inline void php_json_encode_init(php_json_encoder *encoder)
32{
33 memset(encoder, 0, sizeof(php_json_encoder));
34}
35
37
38zend_result php_json_escape_string(smart_str *buf, const char *s, size_t len, int options, php_json_encoder *encoder);
39
40#endif /* PHP_JSON_ENCODER_H */
size_t len
Definition apprentice.c:174
char s[4]
Definition cdf.c:77
memset(ptr, 0, type->size)
zval * val
Definition ffi.c:4262
zend_ffi_ctype_name_buf buf
Definition ffi.c:4685
php_json_error_code
Definition php_json.h:42
PHP_JSON_API size_t int options
Definition php_json.h:102
zend_result php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder)
zend_result php_json_escape_string(smart_str *buf, const char *s, size_t len, int options, php_json_encoder *encoder)
struct _php_json_encoder php_json_encoder
php_json_error_code error_code
struct _zval_struct zval
ZEND_RESULT_CODE zend_result
Definition zend_types.h:64