Quick puzzle 🧩
The JSON in the image looks fine, but JSON.parse() rejects it, and so will most APIs.
One character is the problem. Which line is it on?
Hint: it's a habit JavaScript allows and JSON doesn't.
Comment your line number. We'll post the answer this evening.
When you hit "Unexpected token" for real, paste the JSON into a validator before you hunt through a 500-line file: https://seopeck.com/tool/json-validator

Top comments (0)