[Cialug] What's a JSON Document?

Todd Walton tdwalton at gmail.com
Thu Aug 30 16:05:17 UTC 2018


I know what JSON is. But I don't know what a JSON document is defined as.
Wait, scratch that. It's not called a "document", it's called a "text".

So I went off researching JSON this morning, and here are some things I
found:

1) ECMA defines it, of course, being it's derived from
JavaScript/ECMAScript. There's also an RFC: 8259.
1a) RFC 8259 was published just last December!
2)
https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
3) https://tools.ietf.org/html/rfc8259
4) ECMA says "JSON" is pronounced like "Jason". I prefer to say "jay-sawn".
5) ECMA is a *lot* sloppier with their specifications than the IETF, and
with the quality of their documentation.
5a) <rant> ECMA! Shill for Microsoft. Skin disease. So on. </rant>
6) "Hello, world" is a complete JSON text. Nothing says you have to have
braces or brackets.
7) Unicode is not actually strictly required.... (I did not expect that.)

So my question... Must a JSON text be *one* object or *one* array or *one*
unstructured string, number, or allowed constant? And must objects and
arrays be separated by a comma? Is the text between these dashed lines a
conforming JSON text?:

------------
{ "name": "Todd", "occupation": "scalawag" }
{ "fruit": "orange", "delicious": true }
------------

--
Todd


More information about the Cialug mailing list