Processing JSON data

JavaScript Object Notation (JSON) provides web developers with a clean and efficient way to encode data. JSON is a widely adopted format. It simplifies data processing and manipulation. To read more about why you should use JSON, visit

Getting ready

Ensure that your web server is running and you have access to the web root where you can save/upload the files that you will create as part of this recipe.

How to do it…

Learn how to use JSON-formatted data with JavaScript by performing the following steps:

  1. Create a PHP file named request-3.php and save it to the web root of your web server. Use the following PHP code to create and output a list of names as JSON data:
    <?php //Create an array of ...

Get jQuery 2.0 Development Cookbook now with O’Reilly online learning.

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