Bjoern Hoehrmann (2013-12-08T20:00:04.000Z)
* Allen Wirfs-Brock wrote:
>------------start JSON text-------------
>{
>"allenwb":  "there is an objectively observable order to the members of a JSON object",
>"JSON WG participant 1":  "It would be insane to depend upon that ordering",
>"allenwb":  "not if there is agreement between a producer and consumer on the meaning of the ordering",
>"JSON WG participant 2":  "But JSON.parse and similar language bindings don't preserve order",
>"allenwb":  "A streaming JSON parser would naturally preserve member order",
>"JSON WG participant 2": "I din't think there are any such parsers",
>"allenwb": "But someone might decide to create one, and if they do it will expose object members, in order",
>"allenwb": "Plus, in this particular case the schema is so simple the application developer might well design to write a custom, schema specific streaming parser."
>}
>-----------end JSON text-------

There is observable white space outside strings in JSON texts. It would
be insane to depend on the placement of white space outside strings. Not
if there is agreement on the meaning of that white space. Most parsers
do not preserve such white space. A generic ABNF parser would naturally
preserve it...

It is quite possible that there are steganographic or cryptographic pro-
tocols that use insignificant white space in JSON texts as subtle form
of communication or for integrity protection, just like they might use
order of object members for the same purpose.

However, what we are discussing here is what people should assume when
we say "We use JSON!" so there do not have to be detailed negotiations
to establish agreements, i.e., a Standard. And people should very much
assume that the ordering of object members is as insignificant as the
placement of white space outside strings.
-- 
Björn Höhrmann · mailto:bjoern at hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
domenic at domenicdenicola.com (2013-12-10T00:59:59.647Z)
Allen Wirfs-Brock wrote:
> ```json
>{
>"allenwb":  "there is an objectively observable order to the members of a JSON object",
>"JSON WG participant 1":  "It would be insane to depend upon that ordering",
>"allenwb":  "not if there is agreement between a producer and consumer on the meaning of the ordering",
>"JSON WG participant 2":  "But JSON.parse and similar language bindings don't preserve order",
>"allenwb":  "A streaming JSON parser would naturally preserve member order",
>"JSON WG participant 2": "I din't think there are any such parsers",
>"allenwb": "But someone might decide to create one, and if they do it will expose object members, in order",
>"allenwb": "Plus, in this particular case the schema is so simple the application developer might well design to write a custom, schema specific streaming parser."
>}
>```

There is observable white space outside strings in JSON texts. It would
be insane to depend on the placement of white space outside strings. Not
if there is agreement on the meaning of that white space. Most parsers
do not preserve such white space. A generic ABNF parser would naturally
preserve it...

It is quite possible that there are steganographic or cryptographic pro-
tocols that use insignificant white space in JSON texts as subtle form
of communication or for integrity protection, just like they might use
order of object members for the same purpose.

However, what we are discussing here is what people should assume when
we say "We use JSON!" so there do not have to be detailed negotiations
to establish agreements, i.e., a Standard. And people should very much
assume that the ordering of object members is as insignificant as the
placement of white space outside strings.