Interface: DecodeContext
Context passed to ValueSerializer.decode.
Properties
generateNewIds
readonly generateNewIds: boolean;
Whether models decoded from snapshots must get new model ids (the generateNewIds option
of the decoding). A serializer that creates models honors it; references ignore it.
root
readonly root: object;
Root of the tree the value is decoded against.
Methods
decode()
decode(json, key?): unknown;
Decodes a nested value with the same serializer.
Parameters
| Parameter | Type | Description |
|---|---|---|
json | JsonValue | Value to decode. |
key? | PathElement | Where the value is inside its parent, for error paths. |
Returns
unknown
The decoded value.