Re: Patch and test cases too for

From: Date: Mon, 02 Mar 2009 16:43:35 +0000
Subject: Re: Patch and test cases too for
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-43227@lists.php.net to get a copy of this message
Richard Quadling wrote: > 2009/3/2 Scott MacVicar <scott@macvicar.net>: >> Richard Quadling wrote: >>> Hi. >>> >>> Regarding http://bugs.php.net/bug.php?id=47493, >>> I've supplied a patch >>> to the unit tests too. >>> >>> Any chance this could get committed to 5.2+ >>> >> I'm too convinced of the parameter name and I don't think its something >> that should be added to 5.2.9 since its a feature. >> >> Scott >> > > 5.3+ would be OK then. > > As to the param name, I'm not actually changing the name, just adding > another flag. > > In javascript's terminology,the output is an array ... > > [] > > or a hash > > {} > > So forcing a hash for arrays is pretty much what would be wanted and I > as I comment in the request, we have a "force" option when coming FROM > json data ... json_decode ( string $json [, bool $assoc= false [, int > $depth= 512 ]] ) > > And the "name" of the param here is appropriate to PHP's use (assoc is > not part of JSON's or JS's terminology). > > If you can think of a better name for the flag, then I'd be glad to use it. > The JSON spec refers to them as arrays or objects though, as does our documentation I believe. PHP_JSON_FORCE_OBJECT I however have another patch for more strict encoding so I'll try to roll this in a single update. Scott

« previous php.internals (#43227) next »