3 ms·
Here's a similar trick with the Python json module: echo '{"hello":"there"}' | python -mjson.tool
by nigma 14y ago
Here's a similar trick with the Python json module:
echo '{"hello":"there"}' | python -mjson.tool
- oylenshpeegul 14y agoAnd Perl's JSON::XS echo '{"hello":"there"}' | json_xs
- oylenshpeegul 14y agoOr for pretty colors, try Data::Printer echo '{"hello":"there"}' | perl -MJSON -MDDP -E '$f = decode_json readline; p $f'
- harbud 14y agoIs there a colored JSON dumper in Perl?
- lttlrck 14y agoyeah that's mentioned on the second line of TFA
- ericmoritz 14y agodang 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!