7.1.1.1.2.3. claimstore.core.json module

Useful JSON-related methods.

claimstore.core.json.get_json_schema(schema)

Return a given json schema.

Parameters:schema (str.) – schema to be fetched. It must be a string with the format: module.schema_name (e.g. claims.claimants).
Returns:a str with the requested json schema.
Return type:str.
claimstore.core.json.validate_json(json_input, schema)

Validate JSON against a given schema.

Parameters:
  • json_input (dict.) – a dict with the full json to be validated.
  • schema (str.) – JSON schema to use in the validation. It must be a string with the format module.schema_name (e.g. claims.claimants).
Raises:

ValidationError if the instance is invalid.