php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
json_encoder.c File Reference
#include "php.h"
#include "ext/standard/html.h"
#include "zend_smart_str.h"
#include "php_json.h"
#include "php_json_encoder.h"
#include "zend_portability.h"
#include <zend_exceptions.h>
#include "zend_enum.h"
#include "zend_property_hooks.h"
#include "zend_lazy_objects.h"

Go to the source code of this file.

Macros

#define PHP_JSON_HASH_PROTECT_RECURSION(_tmp_ht)
 
#define PHP_JSON_HASH_UNPROTECT_RECURSION(_tmp_ht)
 

Functions

zend_result php_json_escape_string (smart_str *buf, const char *s, size_t len, int options, php_json_encoder *encoder)
 
zend_result php_json_encode_zval (smart_str *buf, zval *val, int options, php_json_encoder *encoder)
 

Macro Definition Documentation

◆ PHP_JSON_HASH_PROTECT_RECURSION

#define PHP_JSON_HASH_PROTECT_RECURSION ( _tmp_ht)
Value:
do { \
if (_tmp_ht) { \
GC_TRY_PROTECT_RECURSION(_tmp_ht); \
} \
} while (0)

Definition at line 109 of file json_encoder.c.

◆ PHP_JSON_HASH_UNPROTECT_RECURSION

#define PHP_JSON_HASH_UNPROTECT_RECURSION ( _tmp_ht)
Value:
do { \
if (_tmp_ht) { \
GC_TRY_UNPROTECT_RECURSION(_tmp_ht); \
} \
} while (0)

Definition at line 116 of file json_encoder.c.

Function Documentation

◆ php_json_encode_zval()

zend_result php_json_encode_zval ( smart_str * buf,
zval * val,
int options,
php_json_encoder * encoder )

Definition at line 659 of file json_encoder.c.

◆ php_json_escape_string()

zend_result php_json_escape_string ( smart_str * buf,
const char * s,
size_t len,
int options,
php_json_encoder * encoder )

Definition at line 368 of file json_encoder.c.