Chapter 4

Generating and Digesting Payloads


  • Using web service protocols and styles and understanding their impacts on mobile applications
  • Understanding common payload formats
  • Digesting XML, HTML, and JSON payloads
  • Generating JSON and xml payloads


You can find the code downloads for this chapter at on the Download Code tab. You can find the code for this chapter in the Chapter 4 download in a single Xcode project with the following major components:

  • A newsreader application that parsers XML, HTML, and JSON data and generates JSON and XML payloads. The source code for this application can be found in the archive.
  • An archive of CNN articles for use with the example app. The articles were saved the day the application was developed. Article content can be found in the “News Content” directory in the archive.
  • A server-side PHP script to process XML and JSON payloads generated in the application. The source code for the server side component is available in the archive.

As more companies invest in initiatives to mobilize their work force, integrating enterprise services into applications will become more common. Successfully communicating with web services, internal to the organization or not, requires the ability to generate and digest the structured ...

Get Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.