Most JSON errors come from a small set of syntax problems. Learn what they mean and how to fix them.
This means the parser found a character it did not expect. Common causes are unquoted keys, single quotes and extra commas.
{"name": Alice}
Fix: wrap values and keys in double quotes.
The document stops before all objects and arrays are closed.
{"name":"Ada"
Fix: add the missing } or ].
Commas after the final item are not valid JSON.
["a", "b",]
Fix: remove the comma after the last value.
Control characters and unsupported symbols must be escaped inside strings.
"line1
line2"
Fix: replace the newline with \n.