Here's a similar trick with the Python json module: echo '{"hello":"there"}' | python -mjson.tool
PJSON: pretty, colorful json output formatting for terminal
11–20 of 36 posts
Re: PJSON: pretty, colorful json output formatting for terminal
#12Re: PJSON: pretty, colorful json output formatting for terminal
#13Here's a similar trick with the Python json module: echo '{"hello":"there"}' | python -mjson.tool
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
#14Re: PJSON: pretty, colorful json output formatting for terminal
#15Re: PJSON: pretty, colorful json output formatting for terminal
#16Re: PJSON: pretty, colorful json output formatting for terminal
#17Even 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
#18If 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?
Re: PJSON: pretty, colorful json output formatting for terminal
#19EDIT: I love seeing something that does an "awesome-print" with terminal colorization, though.
Re: PJSON: pretty, colorful json output formatting for terminal
#20many more options here: http://stackoverflow.com/questions/352098/how-to-pretty-prin...