pacman.utilities.file_format_schemas package¶
Subpackages¶
Module contents¶
A simple bit of support code for validation.
- pacman.utilities.file_format_schemas.validate(json_obj: List[int | float | str | None | Dict[str, int | float | str | None | JsonObject | List[int | float | str | None | JsonObject | JsonArray]] | List[int | float | str | None | Dict[str, int | float | str | None | JsonObject | JsonArray] | JsonArray]] | Dict[str, int | float | str | None | Dict[str, int | float | str | None | JsonObject | List[int | float | str | None | JsonObject | JsonArray]] | List[int | float | str | None | Dict[str, int | float | str | None | JsonObject | JsonArray] | JsonArray]] | List[Dict[str, int | float | str | None | Dict[str, int | float | str | None | JsonObject | List[int | float | str | None | JsonObject | JsonArray]] | List[int | float | str | None | Dict[str, int | float | str | None | JsonObject | JsonArray] | JsonArray]]], schema_filename: str) None [source]¶
Check that the given JSON object (or array) is valid against the given schema. The schema is given by filename relative to this package.
- Parameters:
- Raises:
IOError – If the schema file doesn’t exist.
ValidationError – If the JSON object isn’t valid.