JSON (JavaScript Object Notation) is a lightweight, human-readable text format for representing structured data. It uses key-value pairs and ordered lists, making it the default data exchange format for web APIs.
A JSON document is built from two structures: objects (collections of key-value pairs wrapped in curly braces) and arrays (ordered lists wrapped in square brackets). Values can be strings, numbers, booleans, null, objects, or arrays. For example: {"name": "Bitcoin", "price": 84500, "up": true}.
Despite having "JavaScript" in its name, JSON is language-independent. Every major programming language has built-in support for parsing and generating JSON. When you call a REST API, the server almost always returns a JSON response. Your code parses that JSON into native data structures (objects, dictionaries, or maps depending on the language) and works with it from there.
JSON's popularity comes from its simplicity. Compared to XML (its predecessor for data interchange), JSON is less verbose and easier for both humans and machines to read. It does have limitations: no support for comments, no date type, and no way to reference other parts of the document. For configuration files where comments are helpful, developers sometimes use YAML instead.
JSON is everywhere. API responses, configuration files, database documents, log entries, and inter-service messages all commonly use JSON. If you are building software that consumes external data, you will work with JSON constantly. Knowing how to read, write, validate, and format JSON is a core developer skill.
Every TerminalFeed API endpoint returns JSON. You can use our JSON Formatter and Validator tool to paste, format, and validate any JSON payload. It is one of the most-used tools on the site.