Live data from Hacker News

PJSON: pretty, colorful json output formatting for terminal

igorgue.com

11–20 of 36 posts

Re: PJSON: pretty, colorful json output formatting for terminal

#13
post #8

Here's a similar trick with the Python json module: echo '{"hello":"there"}' | python -mjson.tool

dang and all this time I've been doing this all this time:

   echo '{"hello": "there"}' | python -c "import json, sys; print json.dumps(json.load(sys.stdin), indent=4)"
Thanks for the tip!

Re: PJSON: pretty, colorful json output formatting for terminal

#17
"Small retina display images are fucking huge."

Even when reshown on retina displays, since the HTML standard is to attend to the pixel size and not the physical resolution. Screenshots taken with the standard Cmd-Shift-4 or similar all include proper resolution metadata, should someone want to show it at the correct size.

Re: PJSON: pretty, colorful json output formatting for terminal

#18
post #6

If this is based on pygments, is it reasonable to have a command like this that works on everything pygments knows how to highlight, and plugs into a bunch of pretty-printers / reformatters, e.g. GNU indent? Is there an equivalent of pygments for pretty-printing all the things?

[deleted]
Post reply on HN