Prettifies JSON on the command line.
Copy into anywhere on $PATH
and chmod +x
the file. Remove the .rb
if you like.
Prettify a file:
$ pjson minified.json
Works with multiple files, thanks to the magic of ARGF
.
$ pjson *.json
Plays nice with pipes:
$ pjson minified.json | less
Plays nice with curl, etc.:
$ curl http://example.org/users.json | pjson