O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Processing JSON responses

In the previous recipe we learned how to make HTTP requests. Usually, after we send a request we receive a response from the server and we need to process it. One of the most supported formats used with AJAX for exchanging data is JSON, so this recipe shows you how to process JSON responses using the Sencha Touch and XUI frameworks.

As in the previous recipe, we're going to use two different approaches: one for Sencha Touch and another for XUI. The functionality of both will be slightly different, although our goal of reading the JSON response is the same. For the Sencha Touch approach, we'll build a simple application with one button. When the user clicks on the button, a new HTTP request will be executed and the response ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required