Edit: So why the downvotes? How about a conversation instead?
An interesting and useful criticism would first engage with the strongest arguments of Rich Hickey (creator of Transit and edn). If you find something in his Language of the System talk (https://www.youtube.com/watch?v=ROor6_NGIWU) that you either (a) disagree with (b) think XML solves already, I and many others would certainly be interested in having that conversation.
Note that this doesn't mean the exposition of "Why Transit" can't be better, but that calls for constructive criticism on how explain the ideas better, or a question made in qood faith. What it doesn't call for is a hostile reply saying in effect "pff, already been done already, stop reinventing the wheel".
And now with Schemas and editor support for them, I think it is an acceptable replacement personally.
JSON is a lot more "honest" in this respect, in that it's core data model is already useful for many applications, even without additional standards bolted on top of it. (Though those exist, this article being one of them)
So JSON succeeded because XML is not verbose enough? Really did not see that one coming.
I think you made a good argument, although I personally prefer the more mature XML tooling and metadata support for versioning.
On the contrary, I don't remember one single case when the object was described easily using "node/attribute" separation, but couldn't be described as easily using JSON. In fact, I don't even think it's possible, as you can always make two children for each object: "attributes" and "nodes".
So I guess it actually is unnecessary complication and not the benefit of using XML over JSON.
Its a nice soundbite, but it ends up being less than useful in practice, because all metadata is data, and almost any data can be viewed as metadata, a distinction which is both subjective and strongly influenced by the use to which a consumer is putting the data rather than being determined on the basis solely of the inherent nature of the data.
http://blog.codinghorror.com/xml-the-angle-bracket-tax/
http://nothing-more.blogspot.co.uk/2004/10/where-xml-goes-as...
SOAP's serialisation of RPC predated the popularity of JSON, and has largely been replaced by JSON for web-RPC through REST APIs. Why? Because it's needlessly verbose and complicated.
(I do worry that new serialisation formats are being developed in a vacuum, and we'll reinvent ASN1 or something)
Personally I'm a fan of YAML for both being fast and human readable.
And it's a good data exchange format if you're okay with its loose typing.
But if I need a strongly-typed, extensible markup language, I'd think really hard about inventing my own…
I'm not convinced that "strongly-typed" is an attribute that can meaningfully be possessed by a data exchange format. "Strongly-typed" is about allowed actions in processing data, not about the inherently-static format of data exchange or serialization.
Well, I can dream..
{ number: 1.0000000000000000000000000000001 }
Try parsing the above JSON consistently in several languages without a consistent schema definition.Run it through JSON lint ( http://jsonlint.com/ ), then fix the error (unquoted number text), then run it again and watch the data loss occur due to my original point...
{ number: "1.0000000000000000000000000000001" }
How is it worse than XML?
Use the right tool for the job.
#/usr/bin/python n = 1.0000000000000000000000000000001 print n # 1.0
//Javascript n = 1.0000000000000000000000000000001; console.log(n); // 1
from decimal import Decimal
n = Decimal("1.0000000000000000000000000000001")
just because float is the default, doesn't mean you have to use it. JSON doesn't have anything else, though.Type this in your address bar for an illustration:
javascript:alert(1.0000000000000000000000000000001);
So where can we go here. Yep: { number: "1.0000000000000000000000000000001" }
which means we then break the encapsulation boundary of the metadata. Then we have a wire contract that says "this is a string" and a separate semantic contract that says "this is a decimal".XML:
<number>1.0000000000000000000000000000001</number>
Schema: <xs:element name="number" type="xs:decimal"/>
This is just one example. We can also serialize and deserialize complex self-relational composite types transparently at both ends of the channel.This is a real world problem we encounter in the financial sector every day.