Today's dumbest take: "XML is for data exchange, JSON is for serialization in APIs, and YAML is for configuration"

No; those are all serialization formats with different trade-offs. XML has a formal spec and allows you to have a very detailed schema definition and transform data via a stylesheet transform; this is extremely powerful.

JSON was created to make it faster for JavaScript to pass serialized objects around; it's "programmer friendly" in that it's familiar to anyone who has built a JavaScript object. It's popular for "API with ReSTful verbs" type projects, but it's not required or particularly well-suited -- it's main advantage is that it's fast to parse in JavaScript. It has only rudimentary schema definition.

YAML exists to try to make a simplified hierarchical data structure that's more human-friendly than other markup/serialization formats (which is why it's enticing for config files, even though that's actually a terrible use for it).

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!