4 ms·
I believe though the point was that I kept wondering what it is specifically that XML does better than JSON, since the article didn't specify. And so it occurre
by Udo 16y ago
I believe though the point was that I kept wondering what it is specifically that XML does better than JSON, since the article didn't specify. And so it occurred to me that one way to make use of XML's inherent complexity is indeed to represent an instruction tree. But the question here is not what language is best, or even that JSON can used for the same purpose, it was merely the "discovery" of an inherent XML feature that would make reasonable developers prefer it for a certain task. The whole point is moot, however, since XML is actually intended for structured information interchange, regardless of any recent efforts to portray it otherwise, and that's a task which has been thoroughly taken over by JSON in the last few years.
> If you want a language with a JSON-like syntax, consider using JavaScript.
You're probably right in making this joke though, since JSON is based on JavaScript it certainly owes its popularity mostly to the browser environment.
- simonw 16y ago"it certainly owes its popularity mostly to the browser environment" I don't think that's a given. JSON is useful because it provides a clear, compact syntax for the most commonly useful data structures - lists, dicts, strings, numbers and booleans. That's certainly why I switched to it over XML (and serialised PHP objects).