dub: JSON, SDL, YAML, TOML, what color should we paint it ?
tastyminerals
tastyminerals at gmail.com
Wed Mar 1 07:41:02 UTC 2023
On Tuesday, 28 February 2023 at 14:29:28 UTC, Mathias LANG wrote:
> Currently, Dub uses two formats: JSON and SDL.
>
> JSON was there from the beginning, I assume due to Dub's npm
> inspiration.
> In fact, we still very much depend on JSON internally: until
> recently, JSON object were passed around in quite a few places.
> When we download a package, regardless of the format the
> package recipe is in, we store it as `dub.json`.
>
> [...]
It is safer to just go with whatever is used and accepted as a
reliable format for configs. I like the idea to use plain D tbo.
JSON lacks comments, but it's fine for minimal default projects.
We try to use TOML everywhere in a company, although I cannot say
how well it works as a config for building projects. YAML is the
most risky, since it has a high chance to alienate a sizeable
amount of potential users.
More information about the Digitalmars-d
mailing list