Pretty print JSON
import json
s = '{ "hello": "world", "goodbye": [ "me", "you" ] }'
print json.dumps(json.loads(s), indent=4)
Written by Mark van Cuijk
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#