Complete quick reference guide for JSON syntax, data types, and usage
"key": "value"{}[]"Hello World"42, 3.14, -10, 1.5e10true, falsenull{"name": "John", "age": 30}[1, 2, 3]{
"name": "John Doe",
"age": 30,
"email": "john@example.com",
"active": true
}{
"user": {
"name": "John Doe",
"address": {
"street": "123 Main St",
"city": "New York"
}
}
}{
"users": [
{"id": 1, "name": "Alice"},
{"id": 2, "name": "Bob"},
{"id": 3, "name": "Charlie"}
]
}{
"status": "success",
"data": {
"items": [...],
"total": 100,
"page": 1
},
"timestamp": "2026-03-03T10:30:00Z"
}// Parse JSON string
const data = JSON.parse('{"name":"John","age":30}');
// Stringify object
const jsonStr = JSON.stringify(data, null, 2);
// With error handling
try {
const parsed = JSON.parse(jsonString);
} catch (error) {
console.error('Invalid JSON:', error);
}import json
# Parse JSON string
data = json.loads('{"name":"John","age":30}')
# Convert to JSON
json_str = json.dumps(data, indent=2)
# Read from file
with open('data.json', 'r') as f:
data = json.load(f)
# Write to file
with open('output.json', 'w') as f:
json.dump(data, f, indent=2)// Using Jackson
ObjectMapper mapper = new ObjectMapper();
// Parse JSON
User user = mapper.readValue(jsonString, User.class);
// Convert to JSON
String json = mapper.writeValueAsString(user);
// Pretty print
String prettyJson = mapper
.writerWithDefaultPrettyPrinter()
.writeValueAsString(user);// Decode JSON
$data = json_decode($jsonString, true);
// Encode to JSON
$json = json_encode($data, JSON_PRETTY_PRINT);
// With error checking
$data = json_decode($jsonString);
if (json_last_error() !== JSON_ERROR_NONE) {
echo 'JSON Error: ' . json_last_error_msg();
}\"Double quote\\Backslash\/Forward slash\bBackspace\fForm feed\nNewline\rCarriage return\tTab\uXXXXUnicode character (4 hex digits){"name": "John", "age": 30,}{"name": "John", "age": 30}{'name': 'John'}{"name": "John"}{name: "John"}{"name": "John"}{"name": "John" "age": 30}{"name": "John", "age": 30}{"name": "John" /* comment */}{"name": "John"}BigJSON.online - Free JSON Tools & Resources
Last updated: March 2026 | Share this cheat sheet with your team!
Source: https://www.bigjson.online/resources/cheatsheet
BigJSON.online - Free JSON Tools & Resources | Printed: 3/10/2026