FAQ
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

Search Discussions

  • Scott MacVicar at Dec 9, 2009 at 9:58 pm
    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
    On 9 Dec 2009, at 21:54, Florian Anderiasch wrote:

    <bug_44331.patch>
  • Scott MacVicar at Dec 9, 2009 at 10:06 pm
    Ignore me, it's fine and I'll apply it soon.

    S

    On 9 Dec 2009, at 21:58, Scott MacVicar wrote:

    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
    On 9 Dec 2009, at 21:54, Florian Anderiasch wrote:

    <bug_44331.patch>

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: http://www.php.net/unsub.php
  • Johannes Schlüter at Dec 9, 2009 at 10:18 pm

    On Wed, 2009-12-09 at 22:54 +0100, Florian Anderiasch wrote:

    --- 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedDec 9, '09 at 9:54p
activeDec 9, '09 at 10:18p
posts4
users3
websitephp.net

People

Translate

site design / logo © 2022 Grokbase