3 ms·
Yes I know its got a use and it makes sense when stated simply but when you get into the details everything about XML is so excessive because they tried to cove
by codeulike 5y ago
Yes I know its got a use and it makes sense when stated simply but when you get into the details everything about XML is so excessive because they tried to cover everything, so then you have namespaces and default namespaces and target namespaces and because the schemas are also defined in XML you get DTDs and XSDs and you end up trying to describe arbitrary contraints using really fiddly tags.
The way JSON just kindof waltzed along and took over, despite the obvious drawbacks of it being schema-less, is really interesting.
- saurik 5y agoI would argue the file format had nothing to do with JSON being popular: it is much much easier to generate and access an object that is essentially a native serialization format, so even if you never ever see the XML (and thereby never have to deal with the namespace rules) JSON was going to win over XML for a developer in JavaScript, certainly.. and then the format is also trivially mappable to almost any other language as JavaScript is so devoid of types.
- ludamad 5y agoAt this point, if I don't need efficiency I just use JSON as my wire format. Need to integrate a C++ card game engine with emscripten? I expose 2 functions, one that dumps all as JSON and one that accepts legal moves. The JSON syntax is pretty irrelevant except for light debugging - however, the easy mapping without fussing over many alternate representations is quite relevant