What are advantages of using JSON/XML over a plain string of variable format?
We have an iPhone application where we are receiving a string of variables as a response to our post to an url rather then using JSON/XML from the server.
What would be some of the advantages to us being passed the data in JSON/XML?
JSON enables the transmission of structured data, that you don’t have to parse client side.
It’s useful when you have an html/js client which uses those data to build/fill the interface, as the data are automatically in the format you’ll need in your js code.
Server side, it’s easy to encode/decode too, as all major languages now have efficient libraries.
Prefer JSON over XML as it is both more human readable and lighter.