You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shortest summary seems to be that yaml is a full-powered data serialisation format and has a cleaner syntax (i.e. is a lot nicer to read), though the more powerful feature set can require a little more care.
Toml has a reduced syntax with less room for glitches, but requires more quotes and square brackets and is less easy to read. It is designed for configuration rather than complex data structures.
There seems to be good parsers available for both, and you can control the type-guessing in yaml by selecting yaml 1.2 and the right loader.
My vote is for yaml, as
It has fewer limits so is of more universal use. You can move on to complex tasks without having to learn a new file format
It is nicer and cleaner to read (see link above)
Some of the configuration we have could be quite complex, which would favour yaml. As an example, consider the file mxcubecore/configuration/mockup/gphl/gphl-workflow.yml, with nested lists and dictionaries. It is hard enough to read already, unless you have a colour-coding editor. I shudder to think how it would look in toml.
Both are obviously good, well-supported formats, and could do the job.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
There are two issues here: The semantics we want and the way to code them / migrate to them; and the format to use.
On the latter point, formats, there are lots of comparisons on Google. I would point to https://martin-ueding.de/posts/json-vs-yaml-vs-toml/
The shortest summary seems to be that yaml is a full-powered data serialisation format and has a cleaner syntax (i.e. is a lot nicer to read), though the more powerful feature set can require a little more care.
Toml has a reduced syntax with less room for glitches, but requires more quotes and square brackets and is less easy to read. It is designed for configuration rather than complex data structures.
There seems to be good parsers available for both, and you can control the type-guessing in yaml by selecting yaml 1.2 and the right loader.
My vote is for yaml, as
Both are obviously good, well-supported formats, and could do the job.
What do other people think?
Beta Was this translation helpful? Give feedback.
All reactions