How to view JSON in Chrome like Firefox?
How to get JSON output in Chrome Dev Tools console? - Stack Overflow
Google Chrome display JSON AJAX response as tree and not as a plain text - Stack Overflow
Sharing My Script to Create Chrome Bookmarks JSON file
Videos
Hi webdev, and happy new 2020 for people already there, happy party for the rest of you!
I reeeeeally love Firefox JSON viewer and it's the main thing I miss since I decided to switch to Chrome (as a wannabe frontend dev I find it useful to adhere to industry standards until I have sufficient experience to make my own choices).
Is there any widely used and safe plugin that replicates FF magnificent experience?
Thanks and let's hope 2020 will be a great year for everyone.
JSONView for chrome
- In-browser viewer
- Expand and contract JSON items
- Format validation
- Doesn't require .json ending
Enable:
Chrome wrench button >> Tools >> Extensions >> "Allow access to file URLs"
I got impatient waiting for a new Chrome API and ported JSONView just using simple regex matching.
http://github.com/jamiew/jsonview-chrome
This is a rough draft, but it works! You can install it using "Load unpacked extension" from the chrome://extensions -- working out some kinks but will package it as a real extension soon.
For further prettification checkout the "XML Tree" extension (SuperUser won't let me post 2 links yet)
Got this from Superuser:
If the right-click -> copy is not available you could try:
1 - Right-click the object and select "Store as global variable"
2 - The console will print the new variable's name, for example:
//temp1
3 - Type:
copy(temp1)
The object is now available in your clipboard.
Tested in chrome 36
I used this in Chrome 65 and worked great.
ATM your best option is to use JSON.stringify as explained here.
There is an DevTools Console API for Chrome extensions that allows to customize console output, but it's still experimental.
To see a tree view in recent versions of Chrome:
Navigate to Developer Tools > Network > the given response > Preview
Google Chrome now supports this (Developer Tools > Network > [XHR item in list] Preview).
In addition, you can use a third party tool to format the json content. Here's one that presents a tree view, and here's another that merely formats the text (and does validation).
