php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
json.c File Reference
#include "php.h"
#include "ext/standard/info.h"
#include "zend_smart_str.h"
#include "php_json.h"
#include "php_json_encoder.h"
#include "php_json_parser.h"
#include "json_arginfo.h"
#include <zend_exceptions.h>

Go to the source code of this file.

Functions

PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS (json)
 
PHP_JSON_API zend_stringphp_json_encode_string (const char *s, size_t len, int options)
 
PHP_JSON_API zend_result php_json_encode_ex (smart_str *buf, zval *val, int options, zend_long depth)
 
PHP_JSON_API zend_result php_json_encode (smart_str *buf, zval *val, int options)
 
PHP_JSON_API zend_result php_json_decode_ex (zval *return_value, const char *str, size_t str_len, zend_long options, zend_long depth)
 
PHP_JSON_API bool php_json_validate_ex (const char *str, size_t str_len, zend_long options, zend_long depth)
 
 PHP_FUNCTION (json_encode)
 
 PHP_FUNCTION (json_decode)
 
 PHP_FUNCTION (json_validate)
 
 PHP_FUNCTION (json_last_error)
 
 PHP_FUNCTION (json_last_error_msg)
 

Variables

PHP_JSON_API zend_class_entryphp_json_serializable_ce
 
PHP_JSON_API zend_class_entryphp_json_exception_ce
 
zend_module_entry json_module_entry
 

Function Documentation

◆ PHP_FUNCTION() [1/5]

PHP_FUNCTION ( json_decode )

Definition at line 258 of file json.c.

◆ PHP_FUNCTION() [2/5]

PHP_FUNCTION ( json_encode )

Definition at line 220 of file json.c.

◆ PHP_FUNCTION() [3/5]

PHP_FUNCTION ( json_last_error )

Definition at line 354 of file json.c.

◆ PHP_FUNCTION() [4/5]

PHP_FUNCTION ( json_last_error_msg )

Definition at line 363 of file json.c.

◆ PHP_FUNCTION() [5/5]

PHP_FUNCTION ( json_validate )

Definition at line 312 of file json.c.

◆ php_json_decode_ex()

PHP_JSON_API zend_result php_json_decode_ex ( zval * return_value,
const char * str,
size_t str_len,
zend_long options,
zend_long depth )

Definition at line 180 of file json.c.

◆ php_json_encode()

PHP_JSON_API zend_result php_json_encode ( smart_str * buf,
zval * val,
int options )

Definition at line 141 of file json.c.

◆ php_json_encode_ex()

PHP_JSON_API zend_result php_json_encode_ex ( smart_str * buf,
zval * val,
int options,
zend_long depth )

Definition at line 126 of file json.c.

◆ php_json_encode_string()

PHP_JSON_API zend_string * php_json_encode_string ( const char * s,
size_t len,
int options )

Definition at line 111 of file json.c.

◆ php_json_validate_ex()

PHP_JSON_API bool php_json_validate_ex ( const char * str,
size_t str_len,
zend_long options,
zend_long depth )

Definition at line 202 of file json.c.

◆ ZEND_DECLARE_MODULE_GLOBALS()

PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS ( json )

Definition at line 36 of file json.c.

Variable Documentation

◆ json_module_entry

zend_module_entry json_module_entry
Initial value:
= {
"json",
ext_functions,
PHP_MINIT(json),
PHP_RINIT(json),
PHP_MINFO(json),
PHP_GINIT(json),
}
#define NULL
Definition gdcache.h:45
#define PHP_GINIT
Definition php.h:397
#define PHP_MINFO
Definition php.h:396
#define PHP_RINIT
Definition php.h:394
#define PHP_MINIT
Definition php.h:392
#define PHP_MODULE_GLOBALS
Definition php.h:408
#define PHP_JSON_VERSION
Definition php_json.h:24
#define STANDARD_MODULE_HEADER
#define STANDARD_MODULE_PROPERTIES_EX

Definition at line 77 of file json.c.

◆ php_json_exception_ce

PHP_JSON_API zend_class_entry* php_json_exception_ce

Definition at line 34 of file json.c.

◆ php_json_serializable_ce

PHP_JSON_API zend_class_entry* php_json_serializable_ce

Definition at line 33 of file json.c.