datetime.datetime(2020, 8, 11, 14, 52, 59, 523000, tzinfo=tzlocal()) is not JSON serializable code example
Example: json dumps datetime
def myconverter(o):
if isinstance(o, datetime.datetime):
return o.__str__()
print(json.dumps(d, default = myconverter))