Materials-Data-Science-and-Informatics / dirschema

Spec and validator for directories, files and metadata based on JSON Schema and regexes.
https://materials-data-science-and-informatics.github.io/dirschema/
MIT License
7 stars 0 forks source link

Change HDF5 attribute handling #10

Closed apirogov closed 2 years ago

apirogov commented 2 years ago

Instead of loading all attributes as a single dict, it would probably be better to have each attribute as a path /path/to/node@attr_name that can be validated in the same way.

We could then treat each attribute we care about in a schema like a pseudo-JSON entity and apply JSON Schema for scalar values, lists and more complex types.

Open question: How to distinguish between arbitrary strings and serialized JSON?