by ttezel · 13y ago · 0 comments
...
> ... XML is ugly. JSON is nice since it's human-readable and light.
???
XML:
<list>
<items>
<item>Milk</item>
<item>Eggs</item>
<item>Bread</item>
<item>Butter</item>
</items>
</list>
JSON: {
"list": {
"items": [
"Milk",
"Eggs",
"Bread",
"Butter"
]
}
}
I don't know that either one is particularly close to the way I'd write down a list in real life, to be honest. This is a pretty trivial sample, and neither is especially hard to read/parse by a human. But the JSON still looks closer to line-noise to me. :-)