JSON数据格式(附通译)

JSON数据格式(附翻译)

JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。它基于JavaScript(Standard ECMA-262 3rd Edition - December 1999)的一个子集。 JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族的习惯(包括C, C++, C#, Java, JavaScript, Perl, Python等)。这些特性使JSON成为理想的数据交换语言。易于人阅读和编写,同时也易于机器解析和生成。

五张图让你完全明白JSON的全部

In JSON, they take on these forms:

在JSON里,它们采取这些形式:

An object is an unordered set of name/value pairs. An object begins with { (left brace) and ends with } (right brace). Each name is followed by : (colon) and the name/value pairs are separated by , (comma).

对象是无序的集的名称/值对。对象以开始 {(左括号),并以结束} (右大括号)。每个名称后跟: (冒号) 和用,(逗号) 分隔的名称/值对。

JSON数据格式(附通译)

An array is an ordered collection of values. An array begins with [ (left bracket) and ends with ] (right bracket). Values are separated by , (comma).

数组是值的有序的集合。数组开头 [(左的方括号),并以结束] (右方括号)。用,(逗号) 分隔值。

JSON数据格式(附通译)

value can be a string in double quotes, or a number, or true or false or null, or an object or an array. These structures can be nested.

一个值可以在双引号,或数量,或 true 或 false 或 null,字符串或对象或数组。这些结构可以嵌套。

JSON数据格式(附通译)

string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A character is represented as a single character string. A string is very much like a C or Java string.

字符串是零个或更多的 Unicode 字符,裹在双引号,使用反斜杠转义序列。一个字符表示为单个字符的字符串。一个字符串是很像 C 或 Java 的字符串。

JSON数据格式(附通译)

number is very much like a C or Java number, except that the octal and hexadecimal formats are not used.

数字是很像 C 或 Java 的号码,除了没有使用八进制和十六进制格式

JSON数据格式(附通译)


资料来源:http://www.json.org


JSON在线数据解析

http://json.parser.online.fr

更好用的JSON在线解析

http://jsonparser.com