What is "json"

JSON (Javascript Object Notation - Javascript object notation) is a lightweight data exchange format. For humans, it is easy to read and write; for machines, it is easy to interpret and generate. It is based on a subset of the programming language Javascript, Standard ECMA-262 3a Edition - December - 1999. JSON is in text format and completely language independent, as it uses conventions that are familiar to C languages and family, including C++, C#, Java, Javascript, Perl, Python and many others. These properties cause JSON is an ideal data exchange format.

JSON consists of two structures:

  • A collection of name/value pairs - In several languages, this is characterized as a Object, record, struct, dictionary, hash table, keyed list, or arrays associative.
  • An ordered list of values - In most languages, this is characterized as a array, vector, list or sequence. These are universal data structures. Virtually all modern programming languages support them in one way or another. It is acceptable that a data exchange format that is independent of programming language is based on these structures.

In JSON, the data is presented in this way:

  • A object is a disordered set of name/value pairs. An object starts with { (opening key) and ends with } (closing key). Each name is followed by: (two points) and the name/value pairs are followed by , (comma).

  • One array is a collection of ordered values. The array starts with [ (opening bracket) and ends with ] (closing bracket). Values are separated by , (comma).

  • A value (value in the above image) can be a string (string), or a number, or true or false, or null, or an object or an array. These structures may be nested.

  • One string is a collection of no or more Unicode characters, wrapped in double quotes using inverted bars as escape character. A character is representing as a single string character. A string looks like a string in C or Java.

  • A number is similar to a number in C or Java, except when octal or hexadecimal numbers are not used.

Blank spaces can be inserted anywhere in the symbols. Except for small encoding details, the language is fully described.

Example:

{
    "nomes" : {"primeiros" : "João", "passado": "Doe"},
    "línguas" : ["javascript", "python", "lisp"]
}


More details on http://json.org/json-pt.html