[JSON] I say again, what *is* JSON?

Hmm.

Is this really the JSON spec?  It appears to be nothing more than an
interface between JSON and JavaScript.  It also uses a full language
parser in the definition, which makes the actual situation very hard to
determine.  

The reviver, replacer, and space optional arguments appear to be able to
greatly affect the situation.  Are these also part of the JSON
specification?  Does the WG have to take them into account?  Could the
WG exploit them?

The situation appears to be even more murky than I had thought.  The
document talks about parsing JSON as if it was ECMAScript, but parsing
syntactically valid JSON in this way can throw SyntaxError, depending on
various conditions.   What does this mean?  There is a note that talks
about overwriting preceeding values, but the term does not appear
anywhere else in the document.

In the end, I am left even more confused than when I started.



So, I ask again, is there a definition JSON somewhere around?



peter


From: Nathan <nathan@webr3.org>
Subject: Re: [JSON] Tiny Proposal
Date: Thu, 24 Mar 2011 08:38:25 -0500

> Hi Peter, and anybody else finding confusion around JSON,
> 
> Please do familiarise yourself with section 15.12 of the ECMAScript-262
> [1] specification which covers JSON, it's relations to the rest of 
> ECMAScript-262 (the thing most people mean when they say "javascript") 
> including terms like "key" and "value" and also the parsing and 
> stringification rules:
>    [1] 
> http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf
> 
> Best & Hope that helps,
> 
> Nathan

Received on Thursday, 24 March 2011 14:35:46 UTC