Escape Newlines In Description For Google Calendar Api - Python
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
# 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 |