Json API¶
API for working with the Json type.
Import this module like this:
from sympathy.api import json
Class json.Json
¶
- class sympathy.api.json.Json(filename: str | None = None, mode: str = 'r', **kwargs)¶
A Json structure.
Any node port with the Json type will produce an object of this type.
- classmethod icon()¶
Return full path to svg icon.
- source(other, shallow=False)¶
Update self with the data from other, discarding any previous state in self.
- Parameters:
other (type of self) – Object used as the source for (to update) self.
shallow (bool) –
When shallow is True a deepcopy of other will be avoided to improve performance, shallow=True must only be used in operations that do not modify other.
When shallow is False the result should be similar to performing the shallow=True with a deepcopy of other so that no modifications of either self or other, after the source operation, can affect the other object.
- classmethod viewer()¶
Return viewer class, which must be a subclass of sympathy.api.typeutil.ViewerBase