encodeJsonTree method

  1. @override
Object? encodeJsonTree(
  1. List<E> instance
)
override

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(List<E> instance) {
  return instance.map((e) => elementKind.encodeJsonTree(e)).toList();
}