archives

« Bugzilla Issues Index

#2379 — formal, machine-processable description of JSON syntax and normative force


In several places ECMA-404, 1st Edition / October 2013, contains two
descriptions of components of JSON texts. The first of these is in English
and the second is a form of a syntax diagram.

Neither of these can be considered to be formal or machine-processable. If
ECMA-404, 1st Edition / October 2013 is to be considered as a definition of
JSON, it needs to have a normative, machine-processable description of JSON
text.


There is even a question as to which of the two descriptions is normative.
Although the two generally agree, at least so far as can be determined for
informal descriptions, they differ on strings.

The English text for strings says that most characters may be placed within
quotation marks (twice) but is silent on non-characters whereas the syntax
diagram indicates that most code points can be placed within quotation
marks. The English text for strings says that only ASCII control characters
must be escaped (twice) whereas the syntax diagram says that any control
character must be escaped. The English text for strings discusses the
meaning of all character escaping sequences whereas the syntax diagram only
discusses the two-character escaping sequences.

The situation for JSON strings needs to be fixed. The normative force of
the English text versus the syntax diagrams needs to be clarified.