Skip to content

Instantly share code, notes, and snippets.

@zackdever
Created September 7, 2012 04:47
Show Gist options
  • Save zackdever/3663257 to your computer and use it in GitHub Desktop.
Save zackdever/3663257 to your computer and use it in GitHub Desktop.
pretty print JSON from shell using python executable
# credit http://stackoverflow.com/a/1920585/962091
# sorts keys and pretty prints
echo '{"foo": "lorem", "bar": "ipsum"}' | python -mjson.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment