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.<p>The only thing I have stumbled across is:
http://www.cerny-online.com/<p>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.<p>Is there some buried treasure out there somewhere or do I need to write my own?
<a href="http://code.google.com/p/jsonview/" rel="nofollow">http://code.google.com/p/jsonview/</a> for firefox.<p><a href="https://chrome.google.com/extensions/detail/ddngkjbldiejbheifcmnfmmfiniimbbg?hl=en-gb" rel="nofollow">https://chrome.google.com/extensions/detail/ddngkjbldiejbhei...</a> for chrome.<p>There is also a website that does a decent job as well <a href="http://jsonviewer.stack.hu/" rel="nofollow">http://jsonviewer.stack.hu/</a><p>All very nice viewers mate.
The JSON reference implementation [1] does this with JSON.stringify.<p>[1] <a href="https://github.com/douglascrockford/JSON-js" rel="nofollow">https://github.com/douglascrockford/JSON-js</a>
The Python standard library's "pprint" pretty-prints data structures...it might work for JSON, since it looks basically the same (though I've never tried).