Property Iteration in JSON serialization

Brian Kardell bkardell at gmail.com
Wed Oct 14 16:11:36 PDT 2009


It sounds to me like there is wide agreement in the sense that at
least the basics rules and only disagreement on the fringes...
Otherwise no one on this list in particular would be suggesting that
there is anything remotely like a "de facto" implementation... It
seems that at least those basic rules are required just to function
with the existing expectations everywhere.

It also seems that those expectations aren't likely to change any time
soon for the "default" for-each iteration order whether more robust
and interesting proposals are adopted...

So can't that much be formalized and documented regardless of whether
or not new introductions are made to over-ride "other" predictable
iterators to be used in for-each (or perhaps even some new mechanism
entirely)? The simple fact that conforming to the spec would currently
create a non-workable solution seems to argue that at least the "de
facto" parts should be included...

No?



On Wed, Oct 14, 2009 at 2:37 PM, Waldemar Horwat <waldemar at google.com> wrote:
> Brian Kardell wrote:
>>
>> Uh oh... Patrick looking at the same parts as me reacting the same way
>> (I believe older pre-5 docs also said something similar)...
>> When Oliver said "All ES implementations are required to..." I assumed
>> that I missed something in the new 5 docs - not that everyone just
>> seems to have implemented roughly the same thing...
>>
>> Is it required - or is it not?
>
> It is not required.  We were planning to make it required for ES5 but it
> turns out that implementations do not match each other and implementations
> do not follow insertion order for some kinds of properties such as things
> that could be used as array indices.  Requiring insertion order would make
> iterating over arrays weird.
>
>   Waldemar
>


More information about the es-discuss mailing list