ValidVIA#
- class ethology.io.annotations.validate.ValidVIA(path)[source]#
Bases:
object
Class for valid VIA JSON annotation files.
It checks the input file is a valid JSON file, matches the VIA schema and contains the required keys.
- Raises:
ValueError – If the JSON file cannot be decoded.
jsonschema.exceptions.ValidationError – If the type of any of the keys in the JSON file does not match the type specified in the schema.
jsonschema.exceptions.SchemaError – If the schema is invalid.
ValueError – If the VIA JSON file is missing any of the required keys.