6 ms·
Any suggestions for a format that is sane?
by pm 10y ago
Any suggestions for a format that is sane?
- mintplant 10y agoTOML. https://github.com/toml-lang/toml https://github.com/toml-lang/toml
- nikolay 10y ago[[ something ]]? No, thank you! Jsonnet [0], yes, please! [0]: http://jsonnet.org/ http://jsonnet.org/
- placeybordeaux 10y agoWhy?
- nikolay 10y agoIt's just weird syntax in my view.
- brandonbloom 10y agoI (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.
- ddispaltro 10y agoMy personal favorite is HOCON from Typesafe, https://github.com/typesafehub/config#examples-of-hocon https://github.com/typesafehub/config#examples-of-hocon
- cookrn 10y agoHashicorp has created HCL https://github.com/hashicorp/hcl https://github.com/hashicorp/hcl
- nikolay 10y agoWhich is based on UCL [0]. [0]: https://github.com/vstakhov/libucl https://github.com/vstakhov/libucl
- pjmlp 10y agoI am going to be downvoted, but for me XML is sane and I don't bother to use anything else when given the option.
- nikolay 10y agoNo, 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.
- benley 10y agoJsonnet is a really excellent one, imo: http://jsonnet.org/ 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/ http://flabbergast.org/ The flabbergast homepage has a comparison table that covers most of the things mentioned in this thread: http://flabbergast.org/#comparison http://flabbergast.org/#comparison
- benley 10y agoThis paper also pretty interesting: http://www.masella.name/~andre/2015-srecon-andre_masella.pdf http://www.masella.name/~andre/2015-srecon-andre_masella.pdf