📋 JSON Formatter
JSON formatter, validator, and beautifier tool with syntax highlighting and error detection.
📝 JSON Input
🔧 JSON Tools
🔍 JSON Path Finder
Examples: $.name, $.users[*].email, $..price
🔄 JSON Comparison
📋 JSON Templates
📚 JSON Reference
JSON (JavaScript Object Notation) Syntax:
Data Types:
• String: "text" (must use double quotes)
• Number: 42, 3.14, -10, 1.2e-3
• Boolean: true, false
• null: null
• Object: {"key": "value"}
• Array: [1, 2, 3]
Objects:
{
"name": "John Doe",
"age": 30,
"isActive": true,
"address": {
"street": "123 Main St",
"city": "New York"
},
"hobbies": ["reading", "coding"]
}
Arrays:
[
{"id": 1, "name": "Alice"},
{"id": 2, "name": "Bob"},
{"id": 3, "name": "Charlie"}
]
Common Errors:
• Trailing commas: {"a": 1,} ❌
• Single quotes: {'a': 1} ❌
• Unquoted keys: {a: 1} ❌
• Comments: // not allowed ❌
• Undefined: undefined ❌
JSON Path Syntax:
• $ - Root element
• .key - Child element
• ['key'] - Child element (bracket notation)
• [n] - Array index
• [*] - All array elements
• .. - Recursive descent
• [?(@.key)] - Filter expression
Examples:
• $.store.book[0].title
• $..author
• $.store.book[*].author
• $..book[?(@.price < 10)]
• $.store.book[0,1]
Best Practices:
• Use consistent indentation (2 or 4 spaces)
• Keep objects flat when possible
• Use meaningful key names
• Validate JSON before use
• Consider schema validation
• Use arrays for ordered data
• Use objects for key-value pairs
💰 Support Development
This toolkit is 100% free. If it helped you, consider donating in USDT to support future development.
USDT (TRC20):
TACpbL6iRczHYzE4sJCKfHB3Npw8NoQv37
TACpbL6iRczHYzE4sJCKfHB3Npw8NoQv37
