JSON is an open standard file format and data interchange format, that use human-readable text to store and transmit data objects consisting of attribute-value pairs and array datatypes.
It is a very common data format, which a diverse range of application such as serving as replacement for XML systems.
JSON is a languaged-independent data format. It was derived from JavaScript, but many modern programming languages include code to generate and parse JSON-format data. The official internet media type for JSON is application/json.
JSON filenames use the extension .json
Data types
JSON's basic data types are:
Type |
Description |
Number |
a signed decimal number that may contain a fractional part and may use exponential E notation, but cannot include non-numbers such as NaN. The format makes no distinction between integer and floating-point. JavaScript uses a double-precision floating-point format for all its numeric values (until later also supports BigInt[25]), but other languages implementing JSON may encode numbers differently. |
String |
a sequence of zero or more Unicode characters. Strings are delimited with double-quotation marks and support a backslash escaping syntax. Boolean: either of the values true or false |
Array |
an ordered list of zero or more values, each of which may be of any type. Arrays use square bracket notation with comma-separated elements. |
Object: |
a collection of name–value pairs where the names (also called keys) are strings. Objects are intended to represent associative arrays,[2] where each key is unique within an object. Objects are delimited with curly brackets and use commas to separate each pair, while within each pair the colon ':' character separates the key or name from its value. null: an empty value, using the word null |