Yup. If I have to pick one for a new project, I’ll go with TOML unless there’s a reason to pick something else. I like that it’s simple, while also having a bunch of features for when the project grows.
Pretty much same here. With Spring stuff I still use YAML because TOML doesn’t have first class support yet. If TOML is an option I don’t have to go too far out of my way for them I go for it.
YAML has too many foot guns. It’s still less annoying to read and write than JSON though. Properties files are okay but there doesn’t seem to be an agreed upon spec, so for edge cases it can be confusing.
Yup, YAML is a terrible data format, but for a configuration format that you completely control, it works well. Your parser only needs to be good enough to read the configs you create.
Likewise, JSON is a pretty bad config format due to strictness in the syntax (no optional commas, excessive quotes, etc), but it’s pretty good data format because it’s pretty easy to parse.
TOML is like YAML, but it has fewer corner cases so it’s pretty easy to learn completely.
Though anything is superior when it’s already the status quo on a project.
I don’t know dude, with YAML treating the word no as a Boolean and having like 6 types of multi line strings I’m really inclined to disagree with the “fewer corner cases” part. It’s like waaaaaaaay less corner cases. Imagine pasting the ISO abbreviation for a country as a Boolean value.
The one already being used by the project.
Yup. If I have to pick one for a new project, I’ll go with TOML unless there’s a reason to pick something else. I like that it’s simple, while also having a bunch of features for when the project grows.
Pretty much same here. With Spring stuff I still use YAML because TOML doesn’t have first class support yet. If TOML is an option I don’t have to go too far out of my way for them I go for it.
YAML has too many foot guns. It’s still less annoying to read and write than JSON though. Properties files are okay but there doesn’t seem to be an agreed upon spec, so for edge cases it can be confusing.
Yup, YAML is a terrible data format, but for a configuration format that you completely control, it works well. Your parser only needs to be good enough to read the configs you create.
Likewise, JSON is a pretty bad config format due to strictness in the syntax (no optional commas, excessive quotes, etc), but it’s pretty good data format because it’s pretty easy to parse.
TOML is like YAML, but it has fewer corner cases so it’s pretty easy to learn completely.
Though anything is superior when it’s already the status quo on a project.
I don’t know dude, with YAML treating the word no as a Boolean and having like 6 types of multi line strings I’m really inclined to disagree with the “fewer corner cases” part. It’s like waaaaaaaay less corner cases. Imagine pasting the ISO abbreviation for a country as a Boolean value.