Skip to content

Instantly share code, notes, and snippets.

@woodphil
Created February 22, 2016 22:50
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 woodphil/75c6fbd20b4a0c489d51 to your computer and use it in GitHub Desktop.
Save woodphil/75c6fbd20b4a0c489d51 to your computer and use it in GitHub Desktop.
json double quotes format
import simplejson as json
s = "{'username':'dfdsfdsf'}" #1 INCORRECT, uses '' for quotes in strings
s = '{"username":"dfdsfdsf"}' #2 CORRECT, uses "" for quotes in strings
j = json.loads(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment