3 ms·
Ask HN: Prettyjson for browser?
Anyone know of a package that will display json in a nice way like it does through the browsers console.log from the console?
https://www.npmjs.org/package/prettyjson
I found this but it's only for node and for the CLI. Doesn't translate well for the browser.
- svisser 12y agoThere are browser plugins for Google Chrome.
- mattkrea 12y agoThere are plugins or you could console.log(JSON.stringify(jsonData, null, "\t")); The above will pretty print also.
- uptownhr 12y agoThis 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.
- jgj 12y agofor Firefox: http://jsonview.com/ http://jsonview.com/
- cotsog 12y agoAlso works with Chrome: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc https://chrome.google.com/webstore/detail/jsonview/chklaanhf...
- uptownhr 12y agohmm, not looking for plugins though. I want to display a json to the dom not console.