Hi there,
I've tried to come up with a solution for
Formatting option for json_encode
http://bugs.php.net/bug.php?id=44331
Any comments are highly welcome :)
the patch is against the PHP_5_3 branch as HEAD changes quite some
unicode stuff.
Greetings,
Florian
The JSON API is exported and can't change it as it breaks the ABI. I know the memcached extension uses this.
I'll look into adding something similar this week, thanks for the patch.
S
<bug_44331.patch
Ignore me, it's fine and I'll apply it soon.
S
The JSON API is exported and can't change it as it breaks the ABI. I know the memcached extension uses this.
I'll look into adding something similar this week, thanks for the patch.
S
<bug_44331.patch
--- ext/json/json.c.orig 2009-12-09 22:15:33.000000000 +0100
+++ ext/json/json.c 2009-12-09 22:48:04.000000000 +0100
@@ -42,6 +42,7 @@
#define PHP_JSON_HEX_APOS (1<<2)
#define PHP_JSON_HEX_QUOT (1<<3)
#define PHP_JSON_FORCE_OBJECT (1<<4)
+#define PHP_JSON_FORMAT_OUTPUT (1<<5)
btw. they should be move to a header as we're exporting the API
depending on the.
johannes