country: xx
... and get to Norway?
country: xx
... and get to Norway?
I am convinced that TOML is the _only_ reasonable configuration format, but very few seem to be swayed.
JSON and YAML are really not made for humans. Configuration must always be a hash. Configuration must allow for expository organization of the content to help humans understand what they are editing (comments, whitespace, section headings are very helpful). Parsing configuration should not result in unexpected code execution.
TOML satisfies those criteria.
I would love to see widespread adoption, but people still seem convinced that storing configuration in JSON is human friendly.
HCL suffers from only having a reasonable implementation in Go, however.
It's just that it's badly made for humans, in that it tries to be too helpful, leading to the various footguns scattered around the format.
TOML can be a bit verbose, especially if you have a case where your keys are more like sentences than they are like symbols. But there are no surprises, and it's quite pleasant to write by hand. I agree that it should be the first choice.
A format that allows references to other sections is not a configuration language that is usable by humans.
I understand the people who created it thought it would be usable by humans, but clearly it is too complicated for anyone to be able to understand a YAML file that is bigger than a dozen or so lines.
I don't mean this in a "if you just swap the parser" way. I mean that in the "if you provide JSON to a program that expects YAML, it will parse it". JSON is a subset of YAML
So not only do you have a way of not using YAML, you can also force this decision onto most third-party services as well, and no-one will know the difference.
That's false. http://p3rl.org/JSON::XS#JSON-and-YAML
Some parsers intentionally support subsets of the spec for this reason, and there's multiple specs (like 1.2 which dropped support for things like 'no' to mean false), but that also just means you need to be 100% certain your parser is set up correctly. It's just not worth the extra headache to me.
country_code: NO