Google-chrome – How to enable pretty-printing in Chrome manually

google-chromegoogle-chrome-extensionsjson

There are some great Chrome extensions around for pretty-printing JSON (great SU question here: Google Chrome Plugin for JSON Reading), but they all seem to depend on detecting whether the incoming document is in a JSON format automagically. So, the question is, how can I set it up so that I can pretty-print displayed JSON manually, rather than relying on some extension's magical detection (that may or may not fail to trigger when I need it to)?

I started from that SU post, and found a bootload of extensions:

https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en
https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en
https://chrome.google.com/webstore/detail/pretty-json/ddngkjbldiejbheifcmnfmmfiniimbbg
https://chrome.google.com/webstore/detail/json-sh/gjkjdnonlibmbegailhclgbnfdafpgdh

(i.e., the results for JSON formatter). Those, and more, will all detect JSON formatting, and display it in a pretty-printed way, but none of them support an easy, bugproof way to manually turn it on on a page where JSON is not detected (except by, perhaps, tricking the engine by sticking format=json in the query string, but none of them were explicit about telling me I could do that). Is there a better option out there?

Best Answer

JSON Formatter provides buttons to toggle between raw and formatted views of a JSON document.

It is open source. As of November 2016, the last commit was in March 2015. There are over 100 forks, many of which have more recent commits. It's not immediately clear if one of those forks is better maintained.

The OP of this answer originally wrote: "I feel like a big dummy. Some more thorough searching turned up https://chrome.google.com/webstore/detail/the-missing-json-inspecto/hhffklcokfpbcajebmnpijpkaeadlgfn/related, which is exactly what I need." However, an edited version of this answer indicated that that extension was not open source and was no longer maintained.

Related Question