JSON โ JavaScript Object Notation โ is the most widely used data format on the internet. Every time you check the weather on your phone, load your social media feed or make an online payment, JSON is the format carrying that data.
What is JSON?
JSON is a lightweight text format for storing and transporting data. It was created by Douglas Crockford in the early 2000s as an alternative to XML โ simpler, easier to read and natively supported by JavaScript. Today it is the standard format for REST APIs, configuration files and data exchange across virtually every programming language.
{{
"name": "OneclikDeal",
"tools": 25,
"free": true,
"categories": ["Text", "SEO", "Developer", "Math"]
}}
JSON Data Types
- String โ Text in double quotes:
"Hello, world" - Number โ Integer or decimal:
42,3.14 - Boolean โ True or false (no quotes):
true,false - Null โ Empty value:
null - Object โ Key-value pairs in curly braces:
{{"key": "value"}} - Array โ Ordered list in square brackets:
[1, 2, 3]
Common JSON Formatting Errors
- Trailing commas:
{{"key": "value",}}โ the comma after the last item is invalid in JSON - Single quotes: JSON requires double quotes.
{{'name': 'value'}}is invalid - Unquoted keys:
{{name: "value"}}is JavaScript, not valid JSON - Comments: JSON has no comment syntax.
// thiswill cause parse failures - Missing commas between items: Every item in an object or array must be separated by a comma
Format JSON in One Click
Unformatted (minified) JSON like {{"tools":25,"free":true}} is valid but impossible to debug. Our JSON Formatter adds proper indentation in one click. Choose 2-space, 4-space or tab indentation, then minify back to compact form for production use.