2 ms·
Jup, it is human ergonomics, but a mismatch for your average programming data structure. I think that is one reason why json took of for exchanging machine rea
by exceptione 2y ago
Jup, it is human ergonomics, but a mismatch for your average programming data structure.
I think that is one reason why json took of for exchanging machine readable data, xml is too expressive, and leans towards document authoring.
- tsimionescu 2y agoAgreed, a lot of the features that make XML very nice for embedding tags in text documents make it very inefficient at expressing explicit tree data structures.
- rileymat2 2y agoI doubt that, if I had my money on it I’d guess the main reason is var obj=JSON.parse(string) and its ease.
- exceptione 2y agoThat is half the reason. JSON was limited to Javascript when SOAP/WSDL was king for data exchange. If I remember correctly, XML apis predates json in Javascript. IE5 and XML were really hot back then. xml.loadString() is equally simple. Json got introduced because XMLHttpRequest was an IE-only component. Data exchange was done mostly between servers, back then the front-end was really dumb. Why xml got slowly replaced is because that for machine generated data, json proved to be sufficient. Any json library is easier to work with then their xml counterpart, exactly because of what we discuss here.