JSON syntax rules
- Data is in name /value pairs
- Comma separated data
- Braces save objects
- Square brackets hold array
JSON name /value pairs
JSON data is written in the following format: name /value pairs.
The name /value pair includes the field name (in double quotes), followed by a colon, and then the value:
JSON values can be:
- Number (integer or floating point)
- String (in double quotes)
- Logical value (true or false)
- Array (in square brackets)
- Object (in braces)
JSON objects are composed inside wavy braces.
JSON clusters are composed inside square brackets.
In the precedent over, the item "employees" is a cluster containing three objects. Each item is a record of an individual (with a first name and a last name).
employees.firstName + " " + employees.lastName;
It can likewise be gotten to like this:
employees["firstName"] + " " + employees["lastName"];
Data can be altered like this:
You can modify the data like this:
- The file type of the JSON file is ".json"
- MIME type of JSON text is "application /json"
All Right Reserved and you agree to have read and acceptedour term and condition.
All Rights Reserved.
Spring - Bean Definition