JSON (JavaScript Object Notation) is a type of object in JavaScript language. The benefits of JSON is easy to read and parse. When the client and server need to interact with a large amount of data, using the transmission format may simplify programming JSON client and server.
1 JSON object format
● JSON object format is as follows:
{"key":value,"key":value,...}
For example: { "name": "Arms IT education", "subject": "JavaEE + BigData"}
● JSON object array format is as follows:
[{"key":value,"key":value,...},{"key":value,"key":value,...}...]
For example: [{ "name": "Arms IT education", "subject": "JavaEE"}, { "name": "Arms IT education", "subject": "BigData"}]
2 JSON format string
JSON strings need to use the escape character "\" to "" "escape, in the following format:
"{\"key\":值,\"key\":值}"
For example: "{\" name \ ": \" Band of Brothers IT education \ ", \" slogan \ ": \" make learning a habit \ "}"