Chapter 8. Debugging JSON

JSON has grown leaps and bounds in the last few years, due to which there is an abundance of freely available resources to understand the JSON object we are working with. As we have discussed earlier, JSON can be used for multiple purposes, and it is important to understand the simple things that might break JSON, such as ignoring double quotes, or a trailing comma on the last item in the JSON object, or the wrong content-type being sent over by the web server. In this chapter, let us go over the different ways, in which we can debug, validate, and format JSON.

Using the developer tools

Almost all of the top browsers, such as Mozilla Firefox, Google Chrome, Safari, and Internet Explorer, have powerful debugging tools that ...

Get JavaScript and JSON Essentials 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.