Created
June 13, 2020 13:15
-
-
Save youssefeldakar/62e740057262b4c8845d1c52fed3c2d5 to your computer and use it in GitHub Desktop.
Verify double-quote escaping in JSON
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
#!/usr/bin/python3 | |
import sys | |
import json | |
# Try this ./json-escape.py '"abc"' | |
s = { "a": { "b": sys.argv[1] } } | |
print(json.dumps(s)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment