Single quotes are invalid
JSON requires double quotes around strings and property names.
{'env':'prod'} See the most common invalid JSON patterns, why parsers reject them, and how to repair payloads quickly.
When JSON parsing fails, the raw error message is often too terse to be helpful. You usually get a line and column number, but not a clean explanation of the underlying mistake.
Knowing the most common invalid JSON patterns saves time because you learn to recognize them before reading the full payload character by character.
Invalid JSON is any payload that violates the strict syntax rules required by JSON parsers.
The parser stops at the first invalid token, which means one small issue can hide several more below it.
JSON requires double quotes around strings and property names.
{'env':'prod'} The last property in an object and the last element in an array cannot end with a comma.
{"env":"prod",} Pretty print, validate and minify JSON.
Open full tool pageSome editors tolerate JavaScript-like syntax or use syntax highlighting that does not enforce strict JSON rules. The API parser is stricter.
Paste it into a formatter/validator, fix the first syntax error, and repeat until the payload parses cleanly.