encodeJsonTree method
Converts instance
to a JSON tree.
Before calling this method, you should call isInstance to check whether
instance
is an instance of T
.
Implementation
@override
Object? encodeJsonTree(Map<K, V> instance) {
return instance.map((key, value) {
return MapEntry<String, dynamic>(
keyKind.encodeString(key),
valueKind.encodeJsonTree(value),
);
});
}