Skip to content

Instantly share code, notes, and snippets.

@kyleclegg
Created May 11, 2016 05:57
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 kyleclegg/c07430cf90c915a7173168eb036f9f44 to your computer and use it in GitHub Desktop.
Save kyleclegg/c07430cf90c915a7173168eb036f9f44 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import fileinput
import json
if name == "main":
jsonStr = ''
for aline in fileinput.input():
jsonStr = jsonStr + ' ' + aline.strip()
jsonObj = json.loads(jsonStr)
print json.dumps(jsonObj, sort_keys=True, indent=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment