from_json_generic¶
- lsst.daf.butler.json.from_json_generic(cls: type[SupportsSimple], json_str: str, universe: DimensionUniverse | None = None, registry: Registry | None = None) SupportsSimple ¶
Return new class from JSON string.
Converts a JSON string created by
to_json
and return something of the supplied class.- Parameters:
- json_str
str
Representation of the dimensions in JSON format as created by
to_json()
.- universe
DimensionUniverse
, optional The special graph of all known dimensions. Passed directly to
from_simple()
.- registry
lsst.daf.butler.Registry
, optional Registry to use to convert simple name of a DatasetType to a full
DatasetType
. Passed directly tofrom_simple()
.
- json_str
- Returns:
- constructedAny
Newly-constructed object.