Hacker News new | past | comments | ask | show | jobs | submit login

> Well, because JSON is about the only format I can read on all the languages I use without ambiguity or extra dependencies

Alas, there is a downside: The JSON spec does not allow comments, which are often important for configuration files. (Though given how much that simplifies parsing, it may have been the right decision.)

So you either omit comemnts, or end up trying to shove placeholder key-values into the closest place you can to whatever you want to comment about.




For configuration files I just put in comments anyway and strip them before feeding the file to a JSON parser. (Like here: https://github.com/creshal/yspave/blob/master/yspave/pave.py... )

Hackish, but beats having to bother with YAML parsers and their regular RCE vulnerabilities.




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

Search: