Re: wddx problems after last change.

From: Date: Fri, 16 Jun 2000 14:05:56 +0000
Subject: Re: wddx problems after last change.
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-21516@lists.php.net to get a copy of this message
On Fri, Jun 16, 2000 at 09:02:19AM -0500, Andrei Zmievski wrote: > On Fri, 16 Jun 2000, Thies C . Arntzen wrote: > > i'd like to change you latest > > > > "Changed WDDX to always serialize arrays as structs." > > > > to somthing smarter. when using <STRUCT> the javascript > > deserializer creates associative arrays (what a suprise) - > > but asooc arrays in javascript suck badly. so i'll walk thru > > the array once to check if we can generate a normal array or > > if we have to ge with a structure. > > Hmm. I suppose it would be fine, if slower. Walk through hash keys and > if even one is a string, serialize as struct. You should know that > before that change I checked the first entry of the array to see whether > to serialize as array or struct and people complained.. i know - but now i've got bitten personally;-) i'll traverse the hash 1st to see if it's pure 0 to n array. if yes i'll serialize as array if no -> as struct! tc > > -Andrei > > "The secret of flying is to throw yourself > at the ground, and miss." -- Douglas Adams -- Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.dev (#21516) next »