summaryrefslogtreecommitdiff
path: root/ext/json/php_json.h
diff options
context:
space:
mode:
authorAdam Harvey <aharvey@php.net>2010-09-16 16:21:15 +0000
committerAdam Harvey <aharvey@php.net>2010-09-16 16:21:15 +0000
commitcb9c8233fc2d3f30c704b8a96b774aae4559d8b0 (patch)
tree16ad474edcf7527247bc4a8ab7ba12a03ddef0cc /ext/json/php_json.h
parentd8b8d22a0d1ae85b24beeab7707c2e4e8217ee07 (diff)
downloadphp-git-cb9c8233fc2d3f30c704b8a96b774aae4559d8b0.tar.gz
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. ;)
Diffstat (limited to 'ext/json/php_json.h')
-rw-r--r--ext/json/php_json.h2
1 files changed, 2 insertions, 0 deletions
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