Section 15.12 describes the JSON Object.
https://262.ecma-international.org/5.1/#sec-15.12.1.1
JSON has a specific syntax. JSON.stringify returns a string that conforms to this syntax, while JSON.parse expects to receive a string that follows this syntax.
<TAB>
(\t)<CR>
(\r)<LF>
(\n)<SP>
(\u0020)"hello world"
:
"
(double quote) is requiredhello world
can be any characters except ", , or control characters (U+0000 through U+001F)"
(double quote) is required\"
(double quote)\/
(forward slash)\\
(backslash)\b
(backspace)\f
(form feed)\n
(newline)\r
(carriage return)\t
(tab)\
-(opt) DecimalIntegerLiteral JSONFraction(opt) ExponentPart(opt)
-123.45e+6
:
-
(minus sign) is optional for non-negative numbers123
(integer part) is required.45
(fraction part) is optionale+6
(exponent part) is optionalhttps://262.ecma-international.org/5.1/#sec-15.12.1.2
The syntax appears to be structured as follows.
{ }
{ JSONMemberList }
JSONString : JSONValue
[ ]
[ JSONElementList ]
While I hadn't thought about it deeply before, it makes sense that it can be represented this way.