What is JSON?
JSON (JavaScript Object Notation) is a lightweight data format for storing and transmitting structured data. It uses key-value pairs, arrays and nested objects, and is the most common format for web APIs.
What is the difference between JSON and XML?
JSON is more compact, easier to read and faster to parse than XML. Most modern APIs use JSON. XML is still used in SOAP APIs, RSS feeds and configuration files in older systems.
What causes a JSON syntax error?
Common errors: missing closing brackets } or ], missing quotes around keys, trailing commas after the last item, and using single quotes instead of double quotes.
How do I minify JSON?
Minification removes all whitespace, line breaks and indentation to produce the most compact JSON. This reduces file size for production but makes it unreadable — always keep a formatted version for development.