5 ms·
JSON is smaller and easier to parse in JavaScript. Aside from that, there are no real advantages IMO.
by ancarda 13y ago
JSON is smaller and easier to parse in JavaScript. Aside from that, there are no real advantages IMO.
- MatthewPhillips 13y agoParsing RSS/Atom is a solved problem, don't do it yourself, use libraries.
- finnw 13y agoParsing JSON is also a solved problem. And JSON is also easier for humans to read than XML.
- jarek 13y agoBut is parsing an RSS-like format that uses JSON a solved problem?
- dragonwriter 13y agoThat's just parsing JSON and interpreting the data. Since parsing JSON and producing arbitrary object models is a solved problem, parsing an x-like format that uses JSON is also a solved problem for all x (developing the object model to use for it is an issue, perhaps, but you have to have that before you can have any serialization format, so that's not a distinguishing problem between different approaches.) Note that I am not, here, endorsing JSON over other alternatives; the same is obviously true of XML, HTML, YAML, or lots of other potential formats.
- jarek 13y agoRight, the only point I'm making is that ease of parsing JSON shouldn't count as a factor against RSS since RSS parsing is already more done than parsing any JSON-powered RSS alternative as the object model is already defined and implemented.
- ancarda 13y agoWriting JSON is also easier by hand than XML, or at-least it is for me. Any time I'm planning a data structure I always use JSON since it's so well structured. XML is quite loose, unless I use plist theres no data types which is both an advantage and a disadvantage.
- bct 13y ago> JSON is also easier for humans to read than XML. That's extremely debatable.