3 ms·
> Counter-point, JSON sucks and is way overused. The types are too fuzzy, the syntax too quirky, and validators/schemas are almost never present. You can bolt t
by lmm 3y ago
> Counter-point, JSON sucks and is way overused. The types are too fuzzy, the syntax too quirky, and validators/schemas are almost never present. You can bolt that all on, but it wasn't designed for it and it shows.
XML's validation, schemas and typing are far more complicated and equally useless - the impedance mismatch is too big, all they do is give you a whole bunch of extra ways to shoot yourself in the foot, particularly in the presence of namespaces. If you want something fully structured, protobuf or equivalent is the way to go (and converting back and forth between protobuf and JSON is relatively painless).
- Turskarama 3y agoXML Namespaces are one of the worst anti-features I have ever encountered. I have yet to see a legitimate use for them, but they make parsing way more of a pain than it needs to be. Also the use of attributes vs nested tags seems pretty arbitrary and in my experience attributes are hardly used at all.
- jmbwell 3y agoYeah. Look, I’m a booster for XML. But I recently worked on a project to interface with Microsoft Office documents. So many conflicting namespaces. So. Many. Conflicting. Namespaces. Often for the same “kind” of document, at least as far as the user is concerned. So much flexibility. So many ways to paint yourself into a corner. Such a nightmare. Also, the reason we have jobs.