JSON is a human-readable text format that facilitates data interchange between different programming languages.

Here are some quick points about JSON:

  • JSON is popular. JSON (JavaScript Object Notation) is quite possibly the most widely used data format for data interchange on the web. It has likely surpassed XML (which is used in AJAX applications) as the most common format used for asynchronous browser/server communication.
  • JSON is a human and machine readable format. In other words, a JSON document is structured in a way that can easily be read by a computer program, while a human can usually quickly scan a JSON file and understand the data it contains.

What Does JSON Look Like?

Here's a basic example of a JSON document:

 
{
  "artists" : [
    {
      "artistname" : "Deep Purple",
      "albums" : [
        {
          "albumname" : "Machine Head",
          "year" : "1972",
          "genre" : "Rock"
        }, 
        {
          "albumname" : "Stormbringer",
          "year" : "1974",
          "genre" : "Rock"
        }
      ]
    }
  ]
}

This is about as complex as most JSON documents will get (although most will contain a lot more data).

A JSON document contains text, curly braces, square brackets, colons, commas, double quotes, and maybe a few other characters.

But probably the most prominent thing about JSON, is that its data consists of name/value pairs. These name/value pairs reflect the structure of the data. Even if you don't know JSON, you should be able to get a basic idea of the data structure just by looking at the way data is stored in the above JSON file.