Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Node.js Basics (2014) Building a Command Line Application Preparation and Planning

Aaron Brewer
Aaron Brewer
7,939 Points

View JSON through the Browser in a more friendly manner.

If you have Google Chrome, use an extension like JSON Viewer to view JSON data through the browser in a more friendly matter.

https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh?hl=en-US

Hope this helps! Aaron

Artem Syromiatnikov
Artem Syromiatnikov
4,706 Points

Thanks! Another fantastic chrome extension for working with JSON is JSON Editor:

https://chrome.google.com/webstore/detail/json-editor/lhkmoheomjbkfloacpgllgjcamhihfaj

Happy coding :)

6 Answers

I use https://jsonformatter.curiousconcept.com/ to read json in a more readable format.

You can view your json in a couple of methods listed below :

  1. You could always use your good old text editor - copy the json object, paste it in the text editor, set proper indents and voila !! you have a formatted json object at your disposal.
  2. Using the browser(my personal favorite) - Use your browser to check your json object. Just install the proper extensions/addons to the browser. This extension/addon is called JSON Lite. You can also use JSON View for chrome, but JSON Lite gives you some more details as to number of keys and size. For chrome - https://chrome.google.com/webstore/detail/json-lite/acacmjcicejlmjcheoklfdchempahoag For firefox - https://addons.mozilla.org/en-US/firefox/addon/json-lite/
  3. Using other services - You could use other services like http://prettyjson.com/ and http://jsonprettyprint.net/ where you can just paste the json and you get a formatted output.

Peace !!

Robin Malhotra
Robin Malhotra
14,883 Points

You could also use http://prettyjson.com or simply copy paste in a text editor with JSON support (like atom)

Try this chrome browser plugin. I use it all the time and it's super handy: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc

Joseph Guerra
Joseph Guerra
20,674 Points

This is a good resource too. Copy, paste, and submit. http://jsonprettyprint.net/