Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
|
|
Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
|
|
I really like the INI format. It's more expressive than simple property files and sufficient for most use cases. YAML is sometimes good, but somehow awkward in the details. TOML is for me an unintuitive mix between YAML and INI, although I guess it's very expressive. When INI is not enough, I'd probably prefer JSON or XML.
Removing levels of nesting in favor of square brackets is a win for clarity.
How would YAML distinguish between a number and a string? TOML seems to do this easily but would a YAML parser automatically give you numbers since all strings and numbers look the same (no double quotes)?
How would YAML distinguish between a number and a string? TOML seems to do this easily but would a YAML parser automatically give you numbers since all strings and numbers look the same (no double quotes)?
I know this is an old ass question, but I'll leave this here for whoever else stumbles upon this.
In YAML, you can use quotes for strings if you'd like and I usually do all the time as I prefer things to be a bit more explicit.
Anything which looks like INI makes me cringe. The real test would be something with a multi-line string, can you put newlines inside quotes and do you need a lot of backslashes?