Skip to content

Instantly share code, notes, and snippets.

@asergeyev
Created March 7, 2012 13:58
Show Gist options
  • Save asergeyev/1993301 to your computer and use it in GitHub Desktop.
Save asergeyev/1993301 to your computer and use it in GitHub Desktop.
Prettifying JSON
#!/usr/bin/env node
var fs = require('fs');
fs.readFile( process.argv[2], function(e, b) {console.log(JSON.stringify(JSON.parse(b), null, 2))} )
@asergeyev
Copy link
Author

I know it's not universal and so on, not even trying to make it so. I just have bunch of JSON files that I need to look at, and this is what I use :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment