Re:How to Use JSON Path
by rileymat2 on Friday May 03, 2024 @06:44PM
(#40253182)
I doubt that, if I had my money on it Iād guess the main reason is var obj=JSON.parse(string) and its ease.
[ Parent
| on HN ]
Re:How to Use JSON Path
by exceptione on Friday May 03, 2024 @07:38PM
(#40253495)
That 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.