CHAPTER 6

image

Parsing JSON

In the last chapter, I discussed how to convert a JavaScript value into a valid JSON text using JSON.stringify. In Chapter 4, you learned how JSON utilizes JavaScript’s literal notation as a way to capture the structure of a JavaScript value. Additionally, you learned in that same chapter that JavaScript values can be created from their literal forms. The process by which this transformation occurs is due to the parsing component within the JavaScript engine. This brings us full circle, regarding the serializing and deserializing process.

Parsing is the process of analyzing a string of symbols, either in natural language ...

Get Beginning JSON now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.