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

JSON is a terrible configuration file format. Property names must be quoted, tons of brackets and commas, a mistake comma breaks it, no comments allowed, etc..


That makes it mediocre, not terrible. There are workarounds. For terrible, see sendmail.


JSON5 is a more reasonable format for config files, in my opinion.


I prefer YAML on my Markdown front matter. It's more readable because of no brackets, quotes, or commas.


Seconding the sibling, YAML may look nice but it's absolutely full of awful confusing behavior. If you don't like JSON for human-written stuff, see TOML or the like. I think JSON is great for serialization, it's so simple, but I agree we need something more readable like TOML for human-written data.

https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-fr...


Do you convert your Markdown front matter to TOML? Also for your clients?


> I prefer YAML on my Markdown front matter. It's more readable because of no brackets, quotes, or commas.

YAML is full of pitfalls. I think the brackets/braces and quotes are worth giving up a small amount readability to eliminate the ambiguity.




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

Search: