5 ms·
JSON is a really poor format for anything but simple data. XML may be verbose and not readable, but it is an excellent format for describing and storing data.
by kumarvvr 6y ago
JSON is a really poor format for anything but simple data.
XML may be verbose and not readable, but it is an excellent format for describing and storing data.
One alternative for SVG could be an SQL table like datastore, similar to sqlite. I would love yo have the ability to query data, rather than parse through XML. I do understand that transferring such data blobs over networks is an issue.
- mywittyname 6y agoThe biggest issue I have with XML is the ambiguity between attributes and child elements. The distinction makes sense in an abstract perspective, but real-world implementations rarely use them in a consistent manner.
- Groxx 6y agoOne's a dictionary (unordered, simple unique keys), and one's a list (ordered, arbitrary contents, no uniqueness constraints). Schemas may enforce more, but those are the intrinsic qualities. I agree that use varies widely, but the difference is fairly clear. The existence of nonsense doesn't mean one can't make good decisions.
- qwertay 6y agoIs it more logical to have a point tag which has the attributes x and y or have x and y as their own tags and values? Its not clear to me which makes more sense and it seems the spec writes using xml didn't know either.
- Groxx 6y agosince x and y are simple names, have simple values, and are unique pairs that apply only once to a point: attributes. to use anything else means relying on an arbitrarily-complex custom schema rather than the much-simpler-and-far-more-standard schema of the language itself. similar to how we use datatypes in programming languages rather than just strings everywhere. both work! one is clearly giving up a lot, and gaining little.