Comment

Peter Bengtsson

You need a special serializer for the JSON-to-Python or the Python-to-JSON.
See https://stackoverflow.com/questions/11875770/how-can-i-overcome-datetime-datetime-not-json-serializable for tips.

Parent comment

Sayali

How to do this if we have date column in postgres? it gives error: TypeError: Object of type time is not JSON serializable