TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Prettyjson for browser?

3 pointsby uptownhrover 10 years ago
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.

4 comments

mattkreaover 10 years ago
There are plugins or you could<p>console.log(JSON.stringify(jsonData, null, &quot;\t&quot;));<p>The above will pretty print also.
评论 #8506518 未加载
svisserover 10 years ago
There are browser plugins for Google Chrome.
jgjover 10 years ago
for Firefox: <a href="http://jsonview.com/" rel="nofollow">http:&#x2F;&#x2F;jsonview.com&#x2F;</a>
评论 #8505441 未加载
uptownhrover 10 years ago
hmm, not looking for plugins though. I want to display a json to the dom not console.