What is JSON?
JSON (JavaScript Object Notation) is a lightweight, text-based data format derived from JavaScript object syntax. Despite its name, JSON is language-agnostic and is the dominant format for data exchange in web APIs, configuration files, and data storage.
JSON Syntax Rules
JSON has six value types: strings, numbers, objects, arrays, booleans, and null. The rules are strict: strings must use double quotes, trailing commas are not allowed, and comments are not supported by the specification.
Common JSON Mistakes
The most frequent errors developers encounter: trailing commas after the last property, using single quotes instead of double quotes, using undefined (not a valid JSON value), and forgetting to escape special characters in strings.
JSONPath Queries
JSONPath is to JSON what XPath is to XML. Use expressions like $.users[*].email to extract specific values from complex nested structures. Our JSON Formatter includes a JSONPath query tab.
JSON vs XML vs YAML
JSON is more compact and faster to parse than XML. YAML is more human-readable than JSON but has strict indentation requirements. For APIs, JSON is the clear standard in 2026.