bobocep.cep.engine.receiver.validator.BoboValidatorJSONSchema

class bobocep.cep.engine.receiver.validator.BoboValidatorJSONSchema(schema: dict)[source]

Bases: BoboValidatorJSONable

Validates whether the data type is valid with respect to a given JSON Schema. If the data are a BoboEvent, then the event’s data are checked instead.

__init__(schema: dict)[source]
Parameters:

schema – The JSON schema against which to compare data.

is_valid(data: Any) bool[source]
Returns:

True if data are valid as per the JSON schema; False otherwise.

Raises:

BoboValidatorError: Invalid JSON schema.