4 ms·
TOML is good for config, but not for data exchange though. (Why would I need comments in a data exchange format? Comments are useful when you want to annotate s
by k_sze 5y ago
TOML is good for config, but not for data exchange though. (Why would I need comments in a data exchange format? Comments are useful when you want to annotate some sample data for other developers who will consume or generate that data.)
Also, OpenAPI specs (also known colloquially as Swagger) can only be written in JSON or YAML.
- makeitdouble 5y agoYour requirements seem to be getting pretty close to XML territory. To note, JSON specifically doesn’t have comments to close the door to annotations and other kind of meta use.
- thayne 5y agoAgreed, so use JSON for data exchange and TOML for configuration. YAML isn't all that great for data exchange either. In the cases where you have a tool that require json or yaml, you could use something like cue, dhall, or jsonnet, and convert it into json (or yaml). Unfortunately, that's a little tricky when your build cinfiguration itself has to be in yaml, as is the case for github actions, travis-ci, etc.