News for hackers. Stuff that matters.
Re:The Pretty JSON Revolution by Garlef on Tuesday February 23, 2021 @11:10AM (#26238952)
I checked the spec again:

It's unclear: At one point it says "An object is an unordered set of name/value pairs." while in the actual grammar it is ordered:

    object
        '{' ws '}'
        '{' members '}'
    
    members
        member
        member ',' members
Re:The Pretty JSON Revolution by gmfawcett on Tuesday February 23, 2021 @11:14AM (#26239005)
I recommend reading the ECMA-404 spec instead. It's less ambiguous, and basically says that you can treat the pairs as ordered if you want, as the syntax itself doesn't imbue the order with any meaning:

https://www.ecma-international.org/wp-content/uploads/ECMA-4...

Re:The Pretty JSON Revolution by dragonwriter on Tuesday February 23, 2021 @01:17PM (#26240645)
Grammar is inherently ordered, semantics is different from syntax.