Scenario :
I am working on a parser for data which is sent back from a server after making a request. The format of data is either JSON or XML.
Question:
- Are there any reasons to choose one of these formats over the other one?
- Which one is faster, parsing json or parsing xml?
Thanks all.
Checkout this tutorial about parsing XMLs. I might sound opinionated, but if there’s a choice go for JSON, although I have no clue what situation your project is in. I would certainly look at the entire architecture (trade-offs and choices) of the project before making a decision. From my experience, understanding JSON and relating it to NSDictionaries and NSArrays is much easier than understanding XMLs.