datetime.datetime(2020, 9, 7, 0, 0) is not JSON serializabl code example
Example: json dumps datetime
def myconverter(o):
if isinstance(o, datetime.datetime):
return o.__str__()
print(json.dumps(d, default = myconverter))
def myconverter(o):
if isinstance(o, datetime.datetime):
return o.__str__()
print(json.dumps(d, default = myconverter))