fromJson<T extends Comparable<T> > static method
Implementation
static CompValueList<T> fromJson<T extends Comparable<T>>(Object? _map) {
final Map<String, Object?> map;
if (_map is CompValueList<T>) {
return _map;
} else if (_map is String) {
map = jsonDecode(_map) as Map<String, Object?>;
} else {
map = (_map! as Map).cast();
}
return CompValueList<T>(
(map['values']! as List)
.map((Object? e) => CompVal.fromJson<T>(e))
.toList()
.cast(),
);
}