What is JSON?
Usage & Getting Started
JSON (JavaScript Object Notation) is a lightweight, text-based format for storing and exchanging data. It represents data as key-value pairs and ordered lists, is easy for both people and machines to read, and is the most widely used data format for APIs and web applications today.
A quick example
{
"name": "Ada Lovelace",
"age": 36,
"active": true,
"roles": ["admin", "editor"],
"address": { "city": "London" }
}
What JSON is made of
- Objects: unordered collections of key-value pairs wrapped in curly braces
{ } - Arrays: ordered lists of values wrapped in square brackets
[ ] - Values: a string, number,
true,false,null, object, or array - Keys: always strings wrapped in double quotes
Where JSON is used
- REST and GraphQL APIs, the default way web services send and receive data
- Configuration files such as
package.jsonandtsconfig.json - NoSQL databases like MongoDB, and log/analytics events
- Data exchange between almost any two systems or languages
JSON looks like JavaScript objects, but it is a language-independent format. Virtually every programming language can read and write it.
Work with JSON instantly
Paste any JSON into the JSON Copilot editor to format it, validate it, or explore it as a tree or mind map, all in your browser. New here? See Getting Started.
Still Have Questions?
Check out our other FAQ topics or return to the JSON Copilot app