3 ms·
> primarily because the XML data model is so mismatched with the object structures you find in programming languages I dunno, it matches up reasonably well wit
by wtetzner 2y ago
> primarily because the XML data model is so mismatched with the object structures you find in programming languages
I dunno, it matches up reasonably well with languages that have nestable custom types.
XML labels nodes, and JSON labels edges. They both have pluses and minuses.
- IshKebab 2y agoXML nodes have attributes and contents. No programming language I know of works like that.
- wtetzner 2y agoIt doesn't seem like an especially important distinction. I've never understood why people always make such a big deal about it.
- IshKebab 2y agoIt's a big pain when decoding XML. That's not the only impedance mismatch. The fact that XML is just a soup of objects is not how programming language objects work either. https://docs.rs/serde-xml-rs/0.6.0/serde_xml_rs/#caveats https://docs.rs/serde-xml-rs/0.6.0/serde_xml_rs/#caveats Look at how much more complex this is than the equivalent JSON code, which requires none of these annotations: https://docs.rs/strong-xml/latest/strong_xml/ https://docs.rs/strong-xml/latest/strong_xml/