invenio_migrator/legacy/deposit.py
def default_serializer(o):
    """Default serializer for json."""
    defs = (
        ((datetime.date, datetime.time),
         lambda x: x.isoformat(), ),
        ((datetime.datetime, ),
         lambda x: dt2utc_timestamp(x), ),
    )
    for types, fun in defs:
        if isinstance(o, types):
            return fun(o)
def default_serializer(o):
    defs = (
        ((datetime.date, datetime.time),
         lambda x: x.isoformat(), ),
        ((datetime.datetime, ),
         lambda x: dt2utc_timestamp(x), ),
    )
    for types, fun in defs:
        if isinstance(o, types):
            return fun(o)
def default_serializer ( o ) : defs = ( ( ( datetime . date , datetime . time ) , lambda x : x . isoformat ( ) , ) , ( ( datetime . datetime , ) , lambda x : dt2utc_timestamp ( x ) , ) , ) for types , fun in defs : if isinstance ( o , types ) : return fun ( o )
Default serializer for json.
Default serializer for json .