

Ask HN: Prettyjson for browser? - uptownhr

Anyone know of a package that will display json in a nice way like it does through the browsers console.log from the console?<p>https:&#x2F;&#x2F;www.npmjs.org&#x2F;package&#x2F;prettyjson<p>I found this but it&#x27;s only for node and for the CLI. Doesn&#x27;t translate well for the browser.
======
mattkrea
There are plugins or you could

console.log(JSON.stringify(jsonData, null, "\t"));

The above will pretty print also.

~~~
uptownhr
This doesn't seem like it would print pretty to the DOM. From the console, you
can just console.log a JSON fine. It's when you try to write to the DOM nicely
is where I cannot find a good solution.

------
svisser
There are browser plugins for Google Chrome.

------
jgj
for Firefox: [http://jsonview.com/](http://jsonview.com/)

~~~
cotsog
Also works with Chrome:

[https://chrome.google.com/webstore/detail/jsonview/chklaanhf...](https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc)

------
uptownhr
hmm, not looking for plugins though. I want to display a json to the dom not
console.

