[JSON] Semantics of JSON

On 25 Mar 2011, at 03:19, Peter Frederick Patel-Schneider wrote:
> What I think is really needed for the WG to proceed much further is at
> least initial drafts for:
> 1/ effective syntax for JSON (RFC4627 gives the reference syntax, but
>   what are the problematic parts of this syntax)

RFC4627 *is* the effective syntax.

> 2/ some notion of the meaning of JSON 

Is the following account of the meaning of JSON good enough, Peter? This is selective copy-and-pasting from RFC4627. I added the bits in angle brackets to assist the context-impaired. The only part that is problematic in this copy-and-paste effort is the SHOULD, because objects with duplicate names do not work as expected in many implementations.


A JSON text is a serialized object or array.

An object is [an unordered collection of] zero or more name/value pairs. A name is a string. The names within an object SHOULD be unique.

An array is [an ordered list of] zero or more values.

A value is an object, array, number, or string, or one of the following three literal names: false null true

Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted.

Received on Friday, 25 March 2011 11:23:05 UTC