Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 20: JSON > Summary

SUMMARY

JSON is a lightweight data format designed to easily represent complex data structures. The format uses a subset of JavaScript syntax to represent objects, arrays, strings, numbers, Booleans, and null. Even though XML can handle the same job, JSON is less verbose and has better support in JavaScript.

ECMAScript 5 defines a native JSON object that is used for serialization of objects into JSON format and for parsing JSON data into JavaScript objects. The JSON.stringify() and JSON.parse() methods are used for these two operations, respectively. Both methods have a number of options that allow you to change the default behavior to filter or otherwise modify the process.

The native JSON object is well supported across browsers, including Internet Explorer 8+, Firefox 3.5+, Safari 4+, Opera 10.5, and Chrome.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial