JSON is a lightweight and simple way to represent machine-readable data. It is quickly becoming the defacto standard for shuttling data across the internet, fueled primarily by the rise of mobile and APIs. Most if not all modern programing languages can interpret and produce JSON out of the box.
The most basic element of JSON is a JSON object. JSON objects are bound by curly braces ( {
and }
). WIthin the object is a series of key, value pairs, both enclosed with double quotes and separated by a colon and a space. Individual elements within the object (each key/value pair) are separated by commas just as you would in english. For example, an object representing a dog may be:
{ "name": "Fido", "type": "Golden Retriever" }
Multiple objects are grouped into an array, denoted by square braces ( [
and ]
). Each object within the array is separated by a comma, just as you would in a list of english words. Thus a group of two dogs would be: