Deviations between json2.js and the currently specified behaviour of JSON.stringify

Oliver Hunt oliver at
Fri Jun 5 14:23:28 PDT 2009

On Jun 5, 2009, at 12:01 PM, Allen Wirfs-Brock wrote:

> I must be dense this morning but I don’t see how the two calls to  
> [[Get]] occurs in the algorithm. The first call to [[Get]] for a  
> property key in object holder occurs in step 1 of Str. How does the  
> second call occur?  The only place I see a possibility would be  
> within a replacer function that reaccesses the property via its this  
> value. What am I missing?

Indeed you are correct, i must have misread it at some point and  
remembered that misreading.

> I agree with your analysis of ToString in JA. That means that  
> ToString need to be applied to the key argument in step 1 of Str.   
> Presumably, toJSON methods (Str step 2.b.i) also need to get the raw  
> key as an argument rather than the ToString’d key.

Yes, i forgot about them.

> Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list