JSON Format Guide
JSON (JavaScript Object Notation) is a lightweight text format used for data exchange between systems. It is human-readable, language-independent, and widely used in APIs.
JSON Structure Basics
JSON is made of key-value pairs and ordered lists:
- Objects use curly braces:
{ } - Arrays use square brackets:
[ ] - Keys must be in double quotes:
"name" - String values must be in double quotes:
"value"
Supported Data Types
- String
- Number
- Boolean (
true/false) - Null (
null) - Object
- Array
Valid JSON Example
{
"id": 42,
"name": "Ada",
"isActive": true,
"skills": ["Rust", "TypeScript", "SQL"],
"profile": {
"country": "US",
"timezone": "UTC-5"
},
"manager": null
}
Common JSON Mistakes
- Using single quotes instead of double quotes
- Leaving a trailing comma at the end of object or array items
- Using comments (JSON does not support comments)
- Unquoted object keys
Best Practices
- Use consistent key naming (for example, camelCase)
- Keep nested depth reasonable for readability
- Validate and format JSON before saving or sending in APIs
- Prefer UTF-8 encoding and standard schema documentation for large payloads
For the formal specification, read RFC 7159: The JavaScript Object Notation (JSON) Data Interchange Format.
Need to clean up a payload quickly? Go back to the JSON Formatter page.