CrdtMapCodec<K, V extends Crdt<V> > class
JSON codec for CrdtMap.
Keys are encoded via the supplied Codec<K> (which may produce
any JSON value, including non-strings), so entries are stored as a
list of [encodedKey, encodedValue] pairs rather than as a JSON
object:
{
"v": 1,
"entries": [
[<encoded K>, <encoded V>],
...
]
}
Constructors
-
CrdtMapCodec({required Codec<
K> keyCodec, required Codec<V> valueCodec}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
Object? json) → CrdtMap< K, V> -
override
-
encode(
CrdtMap< K, V> value) → Object? -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited