Skip to content

Instantly share code, notes, and snippets.

@jonjensen
Created February 2, 2011 04:04
Show Gist options
  • Save jonjensen/807220 to your computer and use it in GitHub Desktop.
Save jonjensen/807220 to your computer and use it in GitHub Desktop.
JSON pretty-printer
#!/usr/bin/env perl
use JSON;
my $json = JSON->new;
undef $/;
while (<>) {
print $json->pretty->encode($json->decode($_));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment