Skip to content

Instantly share code, notes, and snippets.

@abi
Created June 21, 2011 22:14
Show Gist options
  • Save abi/1039057 to your computer and use it in GitHub Desktop.
Save abi/1039057 to your computer and use it in GitHub Desktop.
#Usage: py thisfile.py {JSON-string}
#Try py thisfile.py "["foo", {"bar":["baz", null, 1.0, 2]}]"
import json
import sys
if __name__ == "__main__":
obj = json.loads(sys.argv[1])
print json.dumps(obj, sort_keys=True, indent=4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment