validate
get_ome_property(data)
¶
Get the ome property from a JSON document.
This supports both an arbitrary JSON file with a top-level ome property and a
Zarr-group zarr.json file with the ome property nested within the attributes
property. See https://ngff.openmicroscopy.org/rfc/8/index.html#metadata-storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, JSONType]
|
The original JSON document. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ome_data |
dict[str, JSONType]
|
The |
Raises:
| Type | Description |
|---|---|
ValueError
|
When |
Source code in python/src/ngff_rfc8/validate.py
get_ome_validator()
cached
¶
Get a draft-2020-12 JSON Schema validator for ome data.
Returns:
| Name | Type | Description |
|---|---|---|
validator |
Validator
|
The validator object. |
Source code in python/src/ngff_rfc8/validate.py
validate_collection(data, ignore_nodes=False)
¶
Validate a JSON document against the ome JSON Schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, JSONType]
|
JSON document to validate. |
required |
ignore_nodes
|
bool
|
If |
False
|
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the instance is invalid. |