2015/01/29

Pretty print JSON

$ cat json | perl -MJSON::XS -ne 'print JSON::XS->new->pretty(1)->encode(decode_json $_)'

In ~/.bashrc:
alias jsonn='perl -MJSON::XS -ne "print JSON::XS->new->pretty(1)->encode(decode_json \$_)"'

No comments:

Post a Comment