def json_serial(obj):
    if isinstance(obj, datetime.datetime):
        serial = obj.isoformat()
        return serial
JSON serializer for objects not serializable by default json code
dataset/ETHPy150Open mosesschwartz/scrypture/scrypture/scrypture.py/json_serial