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