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

What are the practical modern alternatives for YAML use cased? TOML, others?


People often forget about the environment, and I feel like a lot of the simpler services and applications could be configured through it easily.

For anything that requires more complex structures, JSON5 (https://json5.org/) has been gaining traction. It's basically JSON that allows a couple of more things, including comments, trailing commas, and even unquoted keys, if you're into that.


This for this it indeed looks very much better than json or yaml.


For simple use cases like key-value style config you can use JSON or TOML without too many issues.

For IaC the alternative is general purpose programming languages using declarative infrastructure APIs. E.g. TS, Go, Python with CDK, CDKTF, Pulumi. For CI are stuck with YAML for now.


As another top-level comment mentions, one alternative is NestedText, where everything is a string unless the ingesting code says otherwise, and there is no escaping needed at all.


TOML is good for simple plain structures. As soon as you have more nested structures, you can also use json.


edn

Extensible Data Notation, it's to Clojure what json is to Javascript.


Read the article?




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

Search: