Created
March 7, 2012 13:58
-
-
Save asergeyev/1993301 to your computer and use it in GitHub Desktop.
Prettifying JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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))} ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 :)