JSON (JavaScript Object Notation)
What is JSON (JavaScript Object Notation)?
JSON (JavaScript Object Notation): A lightweight data-interchange format that is easy for humans to read and for machines to parse. The most common format for REST API payloads. JSON, JavaScript Object Notation, is a simple text format for structured data. It uses objects with keys and values, arrays, strings, numbers, booleans and null, as in {"name": "Anna", "orders": 3}.
Frequently asked questions about JSON (JavaScript Object Notation)
How is JSON (JavaScript Object Notation) used in practice?
It is the standard format for web APIs, configuration files and data exchange between systems. Every mainstream language can read and write it, and people can read it too.
What should you keep in mind with JSON (JavaScript Object Notation)?
A few details cause regular bugs. JSON has no date type, so dates travel as strings; ISO 8601 format avoids confusion. Very large integers can lose precision in JavaScript. And trailing commas or comments are not allowed in strict JSON. When building JSON in code, always use your language's encoder, such as json_encode(), rather than concatenating strings, so special characters are escaped correctly.
At a glance
| Category | Core glossary |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |