Ask HN: Library to pretty print JSON?
I feel like I am in Google Hell right now. Why is there not a readily available library that I could call to get a clean, pretty printing of my JSON return output within the browser.
The only thing I have stumbled across is: http://www.cerny-online.com/
While it seems to do what I want, it looks for too chunky and complicated just to get some formatted JSON. Call me lazy, but a good old git clone and a function call would be nice.
Is there some buried treasure out there somewhere or do I need to write my own?
6 comments
[ 2.9 ms ] story [ 17.7 ms ] threadhttps://chrome.google.com/extensions/detail/ddngkjbldiejbhei... for chrome.
There is also a website that does a decent job as well http://jsonviewer.stack.hu/
All very nice viewers mate.
The Firefox plugin states:
Normally when encountering a JSON document (content type "application/json"), Firefox simply prompts you to download the view. With the JSONView extension, JSON documents are shown in the browser similar to how XML documents are shown. The document is formatted, highlighted, and arrays and objects can be collapsed. Even if the JSON document contains errors, JSONView will still show the raw text.
[1] https://github.com/douglascrockford/JSON-js