Hacker News new | ask | show | jobs
by pm 3716 days ago
Any suggestions for a format that is sane?
6 comments

I (original commenter) second TOML. It is very simple, is instantly familiar to anyone who has used ini files or many Unix-style config files, and has many good implementations available.

The [[array]] notation mentioned below is a tad weird, but I've never had an occasion to use it.

[[ something ]]? No, thank you! Jsonnet [0], yes, please!

[0]: http://jsonnet.org/

Why?
It's just weird syntax in my view.
Hashicorp has created HCL https://github.com/hashicorp/hcl
Which is based on UCL [0].

[0]: https://github.com/vstakhov/libucl

Jsonnet is a really excellent one, imo: http://jsonnet.org/

There is also Flabbergast, which is comparable but a little less intuitive for those accustomed to Python-like languages: http://flabbergast.org/

The flabbergast homepage has a comparison table that covers most of the things mentioned in this thread: http://flabbergast.org/#comparison

My personal favorite is HOCON from Typesafe, https://github.com/typesafehub/config#examples-of-hocon
I am going to be downvoted, but for me XML is sane and I don't bother to use anything else when given the option.
No, you're got upvoted by me. XML is great and has all kinds of well-tested tools - query language, schema validation, namespaces, etc.! Not sure why people think it's worse than JSON, TOML or the likes. Less readable? Not really. Plus, more people know HTML than JSON and so it should be less easy to learn than even JSON for people who already know HTML. Maybe the only improvement would be to make it more relaxed like HTML5.