by fox91 · 13y ago · 0 comments
More seriously, it has been gaining popularity because of it's direct relationship to built-in structures in most programming languages.
For example: XML doesn't have a concept of arrays, but accomplishes storing collections in it's own special way. It's up to the parser to determine how this should be referenced and interacted-with, while with JSON there's no question: it's an array.
import json
js = json.loads(wikidump)
That's it. The only reason it's so simple is thanks to this JSON conversion.XML? No clue how to manipulate it properly. I could figure it out of course, but now I don't have to. JSON + Python just works™.