Skip to content

Instantly share code, notes, and snippets.

@jbowes
Created July 21, 2010 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbowes/484943 to your computer and use it in GitHub Desktop.
Save jbowes/484943 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
#
# jsondent - json indenter
#
# (C) 2010 James Bowes <jbowes@repl.ca>
#
# very complicated code!
import sys
import json
loaded = json.load(sys.stdin)
json.dump(loaded, sys.stdout, sort_keys=True, indent=4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment