from_json_pydantic#
- lsst.daf.butler.json.from_json_pydantic(cls_: type[SupportsSimple], json_str: str | bytes | bytearray, universe: DimensionUniverse | None = None, registry: Registry | None = None) SupportsSimple#
Convert from JSON to a pydantic model.
Parameters#
- cls_
typeofSupportsSimple The Python type being created.
- json_str
strorbytesorbytearray The JSON string representing this object.
- universe
DimensionUniverseorNone, optional The universe required to instantiate some models. Required if
registryisNone.- registry
RegistryorNone, optional Registry from which to obtain the dimension universe if an explicit universe has not been given.
Returns#
- model
SupportsSimple Pydantic model constructed from JSON and validated.
- cls_