Created
June 2, 2014 06:40
-
-
Save pawl/7017f7ef477bde8e9bdc to your computer and use it in GitHub Desktop.
Escape Newlines In Google Calendar API - Python
This file contains hidden or 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
# how you need to format the body of the request | |
requestbody = """{ | |
"description": %s, | |
"summary": %s | |
} | |
""" % (json.dumps(description), json.dumps(summary)) # use json.dumps to escape string for the request body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment