deserialise_object#
- deserialise_object(data: str | PathLike[Any] | PurePath | Path | dict[str, Any]) Any #
deserialises from json
- Parameters:
- data
path to json file, json string or a dict
- Returns:
- If the dict from json.loads does not contain a “type” key, the object will
- be returned as is. Otherwise, it will be deserialised to a cogent3 object.
Notes
The value of the “type” key is used to identify the specific function for recreating the original instance.