Introduction to JSON
JSON is a text format that facilitates structured data interchange between all programming languages. JSON
is syntax of braces, brackets, colons, and commas that is useful in many contexts, profiles, and applications.
JSON was inspired by the object literals of JavaScript aka ECMAScript as defined in the ECMAScript
Language Specification, third Edition [1]. It does not attempt to impose ECMAScript’s internal data
representations on other programming languages. Instead, it shares a small subset of ECMAScript’s textual
representations with all other programming languages.
JSON is agnostic about numbers. In any programming language, there can be a variety of number types of
various capacities and complements, fixed or floating, binary or decimal. That can make interchange between
different programming languages difficult. JSON instead offers only the representation of numbers that
humans use: a sequence of digits. All programming languages know how to make sense of digit sequences
even if they disagree on internal representations. That is enough to allow interchange.
JSON text is a sequence of Unicode code points. JSON also depends on Unicode in the hex numbers used in
the \u escapement notation.
Programming languages vary widely on whether they support objects, and if so, what characteristics and
constraints the objects offer. The models of object systems can be wildly divergent and are continuing to
evolve. JSON instead provides a simple notation for expressing collections of name/value pairs. Most
programming languages will have some feature for representing such collections, which can go by names like
record, struct, dict, map, hash, or object.
JSON also provides support for ordered lists of values. All programming languages will have some feature for
representing such lists, which can go by names like array, vector, or list. Because objects and arrays
can nest, trees and other complex data structures can be represented. By accepting JSON’s simple
convention, complex data structures can be easily interchanged between incompatible programming
languages.
JSON does not support cyclic graphs, at least not directly. JSON is not indicated for applications requiring
binary data.
It is expected that other standards will refer to this one, strictly adhering to the JSON text format, while
imposing restrictions on various encoding details. Such standards may require specific behaviours. JSON
itself specifies no behaviour.
Because it is so simple, it is not expected that the JSON grammar will ever change. This gives JSON, as a
foundational notation, tremendous stability. JSON was first presented to the world at the JSON.org website in
2001. JSON stands for JavaScript Object Notation.
Source: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf