@staticmethod
def converter(o):
    """Convert if possible a bytes object to a known python object."""
    if o.mimeType in ['application/x-netcdf']:
        import netCDF4 as nc
        if nc.getlibversion() > '4.5':
            return lambda x: nc.Dataset(o.fileName, memory=x)
        else:
            return None
    if o.mimeType in ['application/json']:
        import json
        return json.loads
    else:
        return None
