What is JSON? A Beginner's Guide
Oct 12, 20256 min read
JSON (JavaScript Object Notation) has become the de-facto standard for data interchange on the web. But what exactly is it, and why has it replaced XML as the favorite tool for developers?
Definition
JSON is a lightweight format for storing and transporting data. It is often used when data is sent from a server to a web page. It is "self-describing" and easy to understand.
Syntax Rules
JSON syntax is derived from JavaScript object notation syntax:
- Data is in name/value pairs
- Data is separated by commas
- Curly braces hold objects
- Square brackets hold arrays
Data Types
Valid JSON values can be:
- String ("name": "John")
- Number ("age": 30)
- Object ("employee": { "name": "John" })
- Array ("employees": ["John", "Anna"])
- Boolean ("sale": true)
- Null ("middlename": null)
Why JSON?
It's platform independent. Although derived from JavaScript, JSON code can be parsed and used by virtually any programming language, including Python, Ruby, Java, and C#.
🚀 Work with JSON
Try our JSON tools: