QUICKTOOLS GUIDE
How to Read and Fix JSON
Understand JSON objects, arrays, strings, commas, and the errors that commonly prevent parsing.
In this guideObjects use curly braces and key/value pairs.Arrays use square brackets.Strings use double quotes.Standard JSON does not allow trailing commas.
The key ideas
- Objects use curly braces and key/value pairs.
- Arrays use square brackets.
- Strings use double quotes.
- Standard JSON does not allow trailing commas.
How the calculation or process works
A formatter is useful because indentation makes nesting visible. When parsing fails, start near the location reported by the error and inspect quotes, commas, brackets, and braces. A syntactically valid document can still contain incorrect data for the application consuming it.
Common mistakes
- Using single quotes for standard JSON strings.
- Leaving a comma after the final property or array item.
- Assuming formatting can correct a wrong value or schema.
Use the related QuickTools utility
Once you understand the method, the QuickTools Read and Fix JSON page can handle the repetitive part of the task.
Important: A general guide explains a method; it does not know the rules, assumptions, or requirements of a particular business, contract, institution, or software system. Check those requirements when they matter.