Skip to content

Instantly share code, notes, and snippets.

@ubergoober
Created September 15, 2015 17:12
Show Gist options
  • Save ubergoober/8379db49f9dba9f3d6c6 to your computer and use it in GitHub Desktop.
Save ubergoober/8379db49f9dba9f3d6c6 to your computer and use it in GitHub Desktop.
Convert ugly json to pretty json using nodejs commandline.
# reference stackoverflow : http://stackoverflow.com/questions/352098/how-can-i-pretty-print-json
node -e "console.log(JSON.stringify(JSON.parse(require('fs').readFileSync(process.argv[1])), null, 4));" [FILENAME]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment