Book Image

JavaScript JSON Cookbook

By : Ray Rischpater, Brian Ritchie, Ray Rischpater
Book Image

JavaScript JSON Cookbook

By: Ray Rischpater, Brian Ritchie, Ray Rischpater

Overview of this book

Table of Contents (17 chapters)
JavaScript JSON Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 3. Using JSON in Simple AJAX Applications

In this chapter, we'll look at the part that JSON plays in asynchronous JavaScript and XML (AJAX) applications that provide better responsiveness than older web pages by dynamically loading bits of a web page on demand.

In this chapter, you'll find the following recipes:

  • Creating an XMLHttpRequest object

  • Making an asynchronous request for data

  • Sending JSON to your web server

  • Accepting JSON using Node.js

  • Getting the progress of an asynchronous request

  • Parsing the returned JSON

  • Issuing a web service request using Node.js