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

> 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.



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

Search: