Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

28. Model-View-Controller-Store > JSON Serialization

JSON Serialization

So far, Nerdfeed deals with XML data only. While XML is nice, it is becoming less popular, and a new data format called JSON (JavaScript object notation) is coming into favor. Like XML, JSON is a human-readable data interchange format. However, JSON is a lot more concise, so it takes up less memory and is faster to transfer across networks.

There is a class that deals with JSON in iOS called NSJSONSerialization. This class can take a chunk of JSON data and turn it into objects. It can also go in the other direction: take objects and turn them into JSON data. Using this class means you don’t have to know with what JSON really looks like. (But, you should anyway, so be sure to read the section at the end of this chapter.)


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint