Created
July 27, 2017 07:03
-
-
Save oshinko/900f6e065c540d47b40e3bcb852af56e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import re | |
import sys | |
def repl(match): | |
return ':"{0}"{1}'.format( | |
match.group(1), | |
match.group(2)) | |
text = re.sub(r':([0-9A-Za-z]+)([,}])', repl, sys.stdin.readline()) | |
print(json.dumps(json.loads(text), indent=4)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment