Common JSON mistakes
JSON is stricter than JavaScript object syntax. Property names must be wrapped in double quotes, strings cannot use single quotes, trailing commas after the last item are not allowed, and comments are not part of the standard. Values like undefined, NaN and functions are invalid too. Most errors this validator finds fall into one of these categories.
Large numbers are another subtle trap: JSON allows arbitrarily long numbers, but JavaScript stores them as 64-bit floating-point values, so integers above 9,007,199,254,740,991 lose precision when formatted. If your data contains long IDs, store them as strings.
Pretty versus minified
Pretty-printed JSON is easy for people to read and review in version control. Minified JSON removes all optional whitespace, typically shrinking payloads by 10 to 30 percent, which matters for network transfer and storage. Both represent exactly the same data.