From cb9c8233fc2d3f30c704b8a96b774aae4559d8b0 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Thu, 16 Sep 2010 16:21:15 +0000 Subject: Implement FR #44331 (Formatting option for json_encode). Bikeshedding about the exact form of the JSON pretty printing and brace handling will only be accepted in the form of patches. ;) --- ext/json/php_json.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/json/php_json.h') diff --git a/ext/json/php_json.h b/ext/json/php_json.h index c321ad292a..7b1c7b72ff 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -38,6 +38,7 @@ extern zend_module_entry json_module_entry; #endif ZEND_BEGIN_MODULE_GLOBALS(json) + int encoder_depth; int error_code; ZEND_END_MODULE_GLOBALS(json) @@ -60,6 +61,7 @@ extern zend_class_entry *php_json_serializable_ce; #define PHP_JSON_FORCE_OBJECT (1<<4) #define PHP_JSON_NUMERIC_CHECK (1<<5) #define PHP_JSON_UNESCAPED_SLASHES (1<<6) +#define PHP_JSON_PRETTY_PRINT (1<<7) /* Internal flags */ #define PHP_JSON_OUTPUT_ARRAY 0 -- cgit v1.2.1