Re:PJSON: pretty, colorful json output formatting for terminal
by nigma on Tuesday September 18, 2012 @08:12PM
(#4541311)
Here's a similar trick with the Python json module:
[ Parent
| on HN ]
Re:PJSON: pretty, colorful json output formatting for terminal
by ericmoritz on Tuesday September 18, 2012 @09:36PM
(#4541574)
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
by oylenshpeegul on Tuesday September 18, 2012 @08:34PM
(#4541385)
And Perl's JSON::XS
echo '{"hello":"there"}' | json_xs
Re:PJSON: pretty, colorful json output formatting for terminal
by oylenshpeegul on Tuesday September 18, 2012 @08:39PM
(#4541402)
Or for pretty colors, try Data::Printer
echo '{"hello":"there"}' | perl -MJSON -MDDP -E '$f = decode_json readline; p $f'