"Reading notes" source http://www.ruanyifeng.com/blog/2009/05/data_types_and_json.html
Although this article is a bit long, but the content inside I think very good. The article mentions that "structurally, all data can eventually be decomposed into three types."
1. The final three types of data are divided into the following categories:
The first type is scalar (scalar), which is a single string (string) or number (numbers), such as "Beijing", a separate word.
The second type is the sequence (sequence), which is a number of related data that are tied together in a certain order, also called an array or list, such as "Beijing, Shanghai."
The third type is mapping (mapping), a name/value pair (Name/value), which has a name and a value corresponding to it, also known as hash (hash) or dictionary (dictionary), such as "Capital: Beijing".
2. JSON Four Rules
1) The data is separated by commas (","). 2) The map is represented by a colon (":"). 3) a set (array) of side data is expressed in square brackets ("[]"). 4) The Set of Mappings (objects) are represented by curly braces ("{}"). |
Strings in JSON typically use double quotation marks
Such as:
[
{"City": "Beijing", "area": 16800, "Population": 1600},
{"City": "Shanghai", "area": 6400, "Population": 1800}
]
--the array represents a collection of ordered data, whereas an object represents a collection of unordered data.
Data types and JSON formats