3 ms·
There's nothing "wrong" with XML but with JSON there's no need to add another 5 pounds (2.2 KG) of JavaScript to convert XML to JavaScript objects. For any othe
by parvenu74 9y ago
There's nothing "wrong" with XML but with JSON there's no need to add another 5 pounds (2.2 KG) of JavaScript to convert XML to JavaScript objects. For any other language it doesn't matter since you're re-mapping to objects, most likely, but with JavaScript eating the web (even on the server side) I think the question should be "why shouldn't this be JSON" as a default. In the end either way works. I would love to see Google Reader resurrected... stopped reading blogs and switched to Twitter and Hacker News once Reader died.
- deleted 9y ago[deleted]
- goalieca 9y ago> There's nothing "wrong" with XML but with JSON there's no need to add another 5 pounds (2.2 KG) of JavaScript to convert XML to JavaScript objects Non web-dev guy here, but browsers have excellent XML parses out there that can turn XML into a document object with a fully fledged query language. Why does it need to be a JS object?
- jklinger410 9y agoI have an old wordpress blog that I would love to introduce to whatever XML reader you would suggest.
- seangrogg 9y agoAlternatively, if all you're doing is supporting RSS, you could opt to just use the DOMParser API (native to most browsers) and navigate a DOMTree which is a type of JavaScript Object already...