Re:The Pretty JSON Revolution
by dragonwriter on Tuesday February 23, 2021 @01:54PM
(#26241225)
> The normative text
Unlike some RFCs, which clearly and explicitly delineate normative from informative material, RFC 8259 does not, but the text you cite is on its face informative rather than normative: it does not specify what an implementation MUST or SHOULD do, or what the object model IS, it describes the variety of preexisting implementations (based, correctly or not, on prior specifications) that are in the wild.
Re:The Pretty JSON Revolution
by hyperion2010 on Tuesday February 23, 2021 @01:37PM
(#26240961)
This reads like multiple instances of the same name in a json object is undefined behavior and the user will get what they deserve if they try to rely on that behavior.
So basically, "it's a free-for-all, we guarantee absolutely nothing unless you 1) don't generate duplicate keys and 2) the code of your consumer doesn't depend on their ordering".
The normative text has the "real" answer, and the real answer is that it's basically undefined behavior. It starts by saying "The names within an object SHOULD be unique", and then elaborates:
https://tools.ietf.org/html/rfc8259#section-4