import datetime
import json
 def receive(self, event, **kwargs):
     payload={
              "id":event.id,
              "lastReceiveTime":event.lastreceivetime
              "createTime":event.createtime,
              "receiveTime":event.receivetime
            }
    r = requests.post("http://localhost:8000/curlRequest", json=payload, headers=self.headers)
    return event
i'm getting error Object of type datetime is not JSON serializable i have tried "lastReceiveTime":datetime.event.lastreceivetime....but this has also not worked.
 
    