JSON syntax can be summarized as follows:
,
.,
.JSON supports the following two data structures:
Data structure | Description |
---|---|
Collection of name/value pairs | key:value,key:value, |
Ordered list of values | [1,2,3,4] |
The following JSON data specifies books.
{ "book": [ { "id":"01", "language": "Java", "edition": "third", "author": "java2s.com" }, { "id":"02", "language": "JSON", "edition": "second" "author": "java2s.com" }] }