json-schema-spec
json-schema-spec copied to clipboard
Units for json schemas
Is it possible to add an optional units to the schemas? For scientific data, that can be critical information to declare for a field and the schema seems a reasonable place to state the expectation for the value.
Doesn't have to be more than the string. e.g. Some languages bring conversion infrastructure along, which seems out of scope.
Related, but a lot of these are beyond scope of a schema:
- https://en.wikipedia.org/wiki/International_System_of_Units
- https://www.unidata.ucar.edu/software/udunits/
- https://en.cppreference.com/w/cpp/language/user_literal
- https://www.boost.org/doc/libs/1_47_0/doc/html/boost_units/Examples.html
- https://pypi.org/project/siunits/
- https://docs.scipy.org/doc/scipy/reference/constants.html#units