It is based on JavaScript Programming Language, a subset of Standard ECMA-262 3rd Edition - December 1999. JSON uses a completely language-independent text format, but also uses conventions similar to the C language family (including C, C, C#, Java, JavaScript, Perl, Python, etc.). These properties make JSON an ideal data exchange language.
JSON is constructed from two structures:
A collection of name/value pairs. In different languages, it is understood as an object, a record, a struct, a dictionary, a hash table, a keyed list, or an associative array. array).
An ordered list of values. In most languages, it is understood as an array.
These are common data structures. In fact most modern computer languages support them in some form. This makes it possible for a data format to be exchanged between programming languages that are also based on these structures.
JSON has the following forms:
An object is an unordered collection of "name/value" pairs. An object starts with "{" (left bracket) and ends with "}" (right bracket). Each "name" is followed by a ":" (colon); "name/value" pairs are separated by "," (comma).
An array is an ordered collection of values. An array starts with "[" (left bracket) and ends with "]" (right bracket). Use "," (comma) to separate values.
value (value) can be a string enclosed in double quotes (string), a numerical value (number), <font face="新宋体">true</font>
, <font face="新宋体">false</font>
, <font face="新宋体">null</font>
, or an object (object) or array (array). These structures can be nested.
string (string) is a collection of any number of Unicode characters enclosed by double quotes, using backslash escaping. A character is a single character string.
Strings (string) are very similar to C or Java strings.
number (number) is also very similar to C or Java numbers. Remove unused octal and hexadecimal formats. Removed some encoding details.
White space can be added between any symbols. The complete language is described below.