Home > Web Front-end > JS Tutorial > json definition_json

json definition_json

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 19:03:51
Original
1267 people have browsed it

We know how to write
xml:



> http://www.jialing.net


John


john@gmail .com
 http://www.john.com


Peggy

 
peggy@gmail.com
 http://www.peggy.com
 

How to write json?
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

Related labels:
Statement of this Website
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
Latest Issues
Backslash present in Json
From 1970-01-01 08:00:00
0
0
0
Get: Transfer JSON data
From 1970-01-01 08:00:00
0
0
0
mysql storage json error
From 1970-01-01 08:00:00
0
0
0
javascript - Problems with displaying json data
From 1970-01-01 08:00:00
0
0
0
Find matching integers in JSON.
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template