For the More Curious: JSON Data

JSON is a data interchange format – a way of describing data so it can be transferred to another system easily. It has a really concise and easy to understand syntax. First, let’s think about why we need to transfer data. An application has some model objects that represent things – like items in an RSS feed. It would make sense that this application would want to share these items with another device.

However, let’s say that other device is an Android phone (and, in our imaginary world, let’s pretend this Android phone’s battery is not drained dry). We can’t just package up an Objective-C RSSItem object and send it to the Android device. We need an agreed-upon format that both systems understand. Both Java (the ...

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.