3 ms·
YAML sucking is no excuse to keep using XML. JSON, JSON5 and TOML are all great alternatives for projects.
by joaohaas 1y ago
YAML sucking is no excuse to keep using XML. JSON, JSON5 and TOML are all great alternatives for projects.
- chowells 1y agoOn multiple occasions, I've wanted a standard format that allows large multi-line text blocks to be unquoted. JSON, JSON5, and TOML don't do that. You know what does? YAML and XML. I'm not really a fan of either of them, but where's the better option that still gives me large unquoted text blocks?
- JonChesterfield 1y agoXML is also game for blocks of text with clumsy <xsl:value-of select='$thing' /> scattered through it for an ad hoc string substitution in those unquoted text blocks. Lua has a nice large blocks of literal text notation too.
- mdaniel 1y agoI hate toml more than most people, but in fairness it does have two kinds of multiline strings: https://toml.io/en/v1.0.0#string https://toml.io/en/v1.0.0#string
- JonChesterfield 1y agoDoubtful. JSON has javascript semantics all over it. TOML I've had to look up and seems vaguely fine as such things go, but doesn't have schemas. XML grows on you. XSL transforms are _probably_ not a good idea but they also kind of grow on you. It turns into html rather easily as well.
- zahlman 1y agoI don't see anything preventing the definition of TOML schemas — in TOML, even. There just doesn't appear to be demand for it.
- osigurdson 1y agoYAML is better than all of those things imo. It is easier for me to read and write and works better with more complex configs when you have mixtures of other types of formats in a single file (e.g. xml, json, bash, etc., which is sometimes useful in Kubernetes).