JSON is a format for storing and transporting data.
JSON is often used when data is sent from a server to a web page.
This JSON syntax defines an employees object: an array of 3 employee records (objects):
A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value:
JSON objects are written inside curly braces.
JSON arrays are written inside square brackets.
In the example above, the object "employees" is an array. It contains three objects.
Each object is a record of a person (with a first name and a last name).
A common use of JSON is to read data from a web server, and display the data in a web page.
For simplicity, this can be demonstrated using a string as input (or read more in our JSON tutorial):
You can read more about JSON in our JSON tutorial.