top | item 44763706

(no title)

joaohaas | 7 months ago

YAML sucking is no excuse to keep using XML. JSON, JSON5 and TOML are all great alternatives for projects.

discuss

order

chowells|7 months ago

On 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|7 months ago

XML 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.

JonChesterfield|7 months ago

Doubtful. 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|7 months ago

I don't see anything preventing the definition of TOML schemas — in TOML, even. There just doesn't appear to be demand for it.

osigurdson|7 months ago

YAML 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).