What's json format?

Editor:

What's json format? What is the role of json? json is how to pass the data?

 

The effect json (json format is a language-independent data exchange)
station using data before and after the exchange ajax

Mobile data terminal and server exchange

Use Json format parsing may represent a convenient object information, JSON two formats:
1) Object Format : { "key1": obj, "key2": obj, "key3": obj ...}

2) array / set format : [obj, obj, obj ... ]

For example: user represented by the object data format json

{"username":"zhangsan","age":28,"password":"123","addr":"北京"}

List <Product> represents a data format json

[{"pid":"10","pname":"小米4C"},{},{}]

As long as the object is enclosed by {}, as long as it is a set of enclosed with []

Note: The object format and can be nested to form an array, a property of an object may be a collection or array

 

Guess you like

Origin blog.csdn.net/hello_world123456789/article/details/88758422