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

> json config files? oh yes

I find JSON makes for awful config files. For the sole reason that they can't be commented.



Sublime Text 2's config files have JSON-like syntax, but allow C (/* */) and C++ (//) style comments.


Unless the program forbids you from adding extra keys, which I do not expect to be the case, you could add dummy keys like

    { 
      actual_config_item: "Some value",
      comment_on_above:   "Explanation / pseudo-comment"
    }


I actually made a language, especially for Chocolat's configuration files. It's a stripped down form of s-exprs, with string literals designed to avoid escape characters.

https://github.com/fileability/self-ml


This, a thousand times this.




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

Search: