Escape Newlines In Description For Google Calendar Api - Python

# 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

(gist)