Home  >  Article  >  Web Front-end  >  Tell everyone what JSON_json is

Tell everyone what JSON_json is

WBOY
WBOYOriginal
2016-05-16 19:03:401005browse

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).

Tell everyone what JSON_json is

An array is an ordered collection of values. An array starts with "[" (left bracket) and ends with "]" (right bracket). Use "," (comma) to separate values.

Tell everyone what JSON_json is

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.

Tell everyone what JSON_json is

A

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.

Tell everyone what JSON_json is

number (number) is also very similar to C or Java numbers. Remove unused octal and hexadecimal formats. Removed some encoding details.

Tell everyone what JSON_json is

White space can be added between any symbols. The complete language is described below.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn