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

Formats targeted strictly at machine/machine interchange ultimately get used for much more. JSON is no exception.

Configuration tends to be the first place that interchange formats are "abused"; even for such a mild abuse, comments are essential. (Hard-core abuses, like XML-based programming languages, are another thing entirely. :-)

To deal with JSON's lack of comments, I've considered writing services and apps that produce JSON, but consume YAML. Here, the interesting qualities of YAML are (1) it's a superset of JSON, and (2) it supports comments.



YAML isn't a strict superset of JSON, although since YAML 1.2 it is very nearly so; with just a little bit of care you can avoid the edge cases (eg. you can have hash keys longer than 1024 characters in JSON but not in YAML), provided you are cognizant of them.




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

Search: