Created
October 26, 2016 20:41
-
-
Save roramirez/6491c1c3e46e45df03f3116ee0618f0a 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
# remove double quote from json from a dict | |
import json, re | |
data = {'example': 1, "other" : {'other_key': "String", 'key_b': False}} | |
config = json.dumps(data) | |
vars = re.sub(r'"([a-zA-Z_]+)":', r'\1:', config) | |
print(vars) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment