Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> objects can't have a trailing comma

This has caused me so much misery in the past, especially since none of the tools will tell you which line the offending comma is on. Great, somewhere in my thousand-plus-line JSON file is a tiny syntax error but you won't tell me where.

Ended up having to regex for them. Didn't do wonders for my trust in JS tooling.



From the command line:

    python -m json.tool < somefile.json
This will tell you where your file is messed up.

There is also https://github.com/zaach/jsonlint


Thanks for the tip :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: