def load(istream, strict=True):
    "Deserialize a patch object."
    try:
        diff = json.load(istream)
        if strict:
            jsonschema.validate(diff, SCHEMA)
    except __HOLE__:
        raise InvalidPatchError('patch is not valid JSON')

    except jsonschema.exceptions.ValidationError as e:
        raise InvalidPatchError(e.message)

    return diff
dataset/ETHPy150Open larsyencken/csvdiff/csvdiff/patch.py/load