JSON
Stands for "JavaScript Object Notation."
JSON is a standard text-based data interchange format. It formats data in a way that is both human- and machine-readable. Web applications and web servers use JSON files to transfer data between applications and servers. While JSON is based on JavaScript, it is a language-independent format that is supported by many programming languages.
JSON is similar to XML (another plain text data interchange format) but is more compact because it does not require separate tags for each element. Instead, JSON contains objects within curly brackets ({}). Each attribute has a name and value, separated by colons (:). A value can consist of a string within quotation marks, a number, a boolean (true or false), another object, or an array contained within square brackets ([]). Attribute name/value pairs are separated by commas (,).
For example, below is an example of a book defined in JSON and XML.
JSON
{
"book": {
"title": "A Study in Scarlet",
"author": "Arthur Conan Doyle",
"publisher": {
"name": "Ward Lock & Co", "year": "1887", "country": "United Kingdom"
}
}
}
XML
<book>
<title>A Study in Scarlet</title>
<author>Arthur Conan Doyle</author>
<publisher>
<name>Ward Lock & Co</name>
<year>1887</year>
<country>United Kingdom</country>
</publisher>
</book>
Even though the JSON and XML objects use roughly the same number of lines to define the book's information, the JSON code uses a lot less text and is easier to read. It also requires less data to store and transfer. These data savings might be negligible for a single data file, but JSON's low overhead can add up to reduce bandwidth and other system resources for web applications that use a lot of data files.
File extension: .JSON