Book Image

The JavaScript JSON Cookbook

By : Ray Rischpater
Book Image

The JavaScript JSON Cookbook

By: Ray Rischpater

Overview of this book

If you're writing applications that move structured data from one place to another, this book is for you. This is especially true if you've been using XML to do the job because it's entirely possible that you could do much of the same work with less code and less data overhead in JSON. While the book's chapters make some distinction between the client and server sides of an application, it doesn't matter if you're a frontend, backend, or full-stack developer. The principles behind using JSON apply to both the client and the server, and in fact, developers who understand both sides of the equation generally craft the best applications.
Table of Contents (12 chapters)
11
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