Search code examples
javascriptjsonpretty-print

Is there a way to pretty-print JSON in a web page using JavaScript?


Seems to me that pretty-printing JSON is a simple enough task that JavaScript should be able to handle it. Has anyone ever written (or run across) a JavaScript function to do this?


Solution

  • What I ended up doing is installing the JSONView add-on for Mozilla. Not perfect, but it gets done what I needed done.