2 ms·
Why is XML a better way to represent HTML than any other hierarchical data representation language? “JSON doesn’t have Multiline strings” would be a good argume
by throwaway894345 6y ago
Why is XML a better way to represent HTML than any other hierarchical data representation language? “JSON doesn’t have Multiline strings” would be a good argument, but there are lots of good reasons that XML is a bad format (overly verbose, overly complicated, parsers frequently have security vulnerabilities, etc etc).
- monadic2 6y agoElement attributes are awkward to express in JSON, at the very least. Maybe if the markup language was originally designed around json it would be a more natural fit.
- throwaway894345 6y agoI think this is fine: { “type”: “div”, “style”: “...”, “children”: [ ... ] } If you really want to treat attributes specially you could put them under an “attributes” key: { “type”: “div”, “attributes”: {“style”: “...”}, “children”: [ ... ] }