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

Yes, I realize I didn't explain it as well in the README as I had in conversations and emails.

I find JSON tedious and error-prone to generate by hand. I also frequently wish I could document the data with comments.

Others have written about these same ideas, e.g. [1]; after feeling the frustration for over a year, I decided it might be productive to actually build a JS parser to get the conversation started.

My main use cases are Node/npm package.json files, and test case data.

[1] http://bolinfest.com/essays/json.html



> I find JSON tedious and error-prone to generate by hand. I also frequently wish I could document the data with comments.

I whole-heartedly agree with you on the tediousness, but JSON has this dubious double-nature that it is sometimes written by hand but mostly used as a protocol. As a protocol we want (and I would even argue need) this strictness since it makes day-to-day operations easier and parsers generally more reliable (how many times have we seen someone implement their own JSON parser? Now, what about XML? The first is a nice evening the latter is, well, not...).

As for package.json, I would argue the problem is their choice of serialisation rather than with JSON itself. Right tool for the wrong job. YAML would probably be a better pick.


> I find JSON tedious and error-prone to generate by hand.

Why do you need to generate it by hand? Create object structures in whatever language you are working in and then simply serialize them to JSON.




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

Search: