deserialize<T> method
Deserialize the provided json data
to an object of type t
or T
.
Implementation
@override
T deserialize<T>(
dynamic data, [
Type? t,
]) {
t ??= T;
if (customConstructors.containsKey(t)) {
return customConstructors[t]!(data, this) as T;
}
if (t == _i2.JsonRpc2Message) {
return _i2.JsonRpc2Message.fromJson(data, this) as T;
}
if (t == _i1.getType<_i2.JsonRpc2Message?>()) {
return (data != null ? _i2.JsonRpc2Message.fromJson(data, this) : null)
as T;
}
return super.deserialize<T>(data, t);
}