We know how to write
xml:
>
John
john@gmail .com
Peggy
peggy@gmail.com
JSON:
{
name: "Michael",
email: "17bity@gmail.com",
Homepage: "http://www.jialing.net"
},
{
name: "John",
email: "john@gmail.com",
homepage: "http://www.jobn.com"
},
{
name:"Peggy",
email:"peggy@gmail.com",
homepage:"http: //www.peggy.com"
}
]
It can be clearly seen:
JSON format:
1, object:
{name:" Peggy",email:"peggy@gmail.com",homepage:"http://www.peggy.com"}
{ attribute : value , attribute : value , attribute : value }
2, the array is A collection of ordered values. An array starts with "[" and ends with "]", and the values are separated by ",".
[
{name:"Peggy",email:"peggy@gmail.com",homepage:"http://www.peggy.com"}, {name:"Peggy",email:"peggy @gmail.com",homepage:"http://www.peggy.com"},
{name:"Peggy",email:"peggy@gmail.com",homepage:"http://www. peggy.com"}
]
3, The value can be a string, number, true, false, null, or an object or array. These structures can be nested.
This article comes from cssrain.cn Original link: http://www.cssrain.cn/article.asp?id=488