Adding the JSON Response
In This Chapter
Seeing how JSON is structured
Using the JSON deserializer that comes with iOS
JSON is a lot like XML, but different, as you can see in Listings 10-1 and 10-2. Currently, JSON is winning favor over XML when it comes to serializing and transmitting structured data over a network connection (such as from a server and an application). I don’t get into which one is better — I know better than to get in the middle of a civil war — but the way JSON is structured makes it more desirable for the kinds of web services you’ll be working on. I could, of course, be all even-handed and point out that many folks believe you should use XML, but I won’t get into that here because, frankly, I have trouble being so darned even-handed all the time. Pick the one you like and go with it, but it seems to me that JSON is the freight train these days, and XML has been regulated to the milk run.
Working with JSON