JavaScript Object Notation
lastmod 2026-09-10created 2018-06-1443 edits
JSON (JavaScript Object Notation) is a lightweight DATA-interchange format. It is easy for humans to read and write, and easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions familiar to programmers of the C-family of languages - C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal DATA-interchange language.
JSON is built on two structures:
- A collection type of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
- An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
These are universal DATA structures. Virtually all modern programming languages support them in one form or another. It makes sense that a DATA format that is interchangeable across programming languages is also based on these structures.
Categories
- JavaScript
- JSON Schema
- JSON RPC
- JSON Lines (jsonl)
- JSONC
- Progressive JSON
- BSON
- JsonCpp
- JSON Spirit
- JSON Web Signature
Syntax
JSON syntax is based on the object syntax of ECMA-262 3rd edition, the JavaScript standard, and is encoded in Unicode. The data types it can represent are numbers, strings, and true/false, and it can also represent arrays and objects. An array is written with square brackets []. Each element of an array is a primitive type, an array, or an object.
An object is a set of name/value pairs enclosed in curly braces {}. Names are strings, so they must be quoted, and values are primitive types, arrays, or objects. The order in which the pairs appear has no meaning.
It is fine to leave the names unquoted as below, but quoting them makes it easier to tell strings and numbers apart.
A JSON message unit is an array or an object. Both examples above can be JSON messages.
Json Path
See JSONPath.
See also
- JavaScript
- JSON Web Token (JWT)
- MessagePack
- Serialization
- JSON5 - JSON for humans
- Apache Fory Rust - a serialization framework 10-20x faster than JSON/Protobuf
- Ziptable - a tool for sharing small datasets with a single link
Favorite site
- Introducing JSON
- Wikipedia (en) description of JSON
- [Recommended] Github - Native JSON Benchmark
- Attacking APIs using JSON injection | GeekNews
- [Original] Attacking APIs using JSON Injection
Online Tools
- JSONtapose - Modern JSON Comparison Tool - making JSON comparison easier and prettier - JSON Tapose
- Apache Fory
- Asyncpg
- Boost:PropertyTree
- CodingGuidelines:TypeScript
- Comma-separated values
- Computer Language
- Docker:Config
- Document Object Model
- ESLint
- Fq
- Fx
- GDM Format
- Geographic Information System
- GeoJSON
- Go:encoding/json
- Hl
- JavaScript:JSON
- JavaScript:Libraries
- Jq
- Jq.py
- Jqpy
- JSON Canvas
- JSON Lines
- JSON Query
- JSON Schema
- JSON Web Key
- JSON Web Token
- JSON-RPC
- JSON5
- JSONC
- Jsongrep
- Kubernetes:Basic
- Linux:UsefulCommandLines
- Lite3
- Markup Language
- MessagePack
- Miller
- MLOps
- Next-i18next
- PDJsonEditor
- PostgreSQL:DataTypes
- PostgreSQL:JSON
- Print.js
- Programming
- Progressive JSON
- Pyjq
- Python:configparser
- Python:Isolation
- Python:json
- Python:Libraries
- Python:logging
- Rowy
- Serialization
- Simdjson
- Sj.h
- SolutionStack:FullStackDeveloper:Curriculum
- Spray-json
- Tbag
- Travels
- Visidata
and 3 more