decodeJsonTree method
Converts json
(any JSON tree) to an instance of T
.
Throws ArgumentError if the JSON does not match.
Implementation
@override
List<E> decodeJsonTree(Object? json) {
if (json is List) {
return json.map((e) => elementKind.decodeJsonTree(e)).toList();
}
throw JsonDecodingError.expectedList(json);
}