Skip to content

Instantly share code, notes, and snippets.

@youssefeldakar
Created June 13, 2020 13:15
Show Gist options
  • Save youssefeldakar/62e740057262b4c8845d1c52fed3c2d5 to your computer and use it in GitHub Desktop.
Save youssefeldakar/62e740057262b4c8845d1c52fed3c2d5 to your computer and use it in GitHub Desktop.
Verify double-quote escaping in JSON
#!/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