Interface: EncodeContext
Context passed to ValueSerializer.is and ValueSerializer.encode.
Properties
root
readonly root: object;
Root of the tree the value is encoded against.
Methods
encode()
encode(value, key?): JsonValue;
Encodes a nested value with the same serializer.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | Value to encode. |
key? | PathElement | Where the value is inside its parent, for error paths. |
Returns
The encoded value.