decodeJsonTree method
Converts json
(any JSON tree) to an instance of T
.
Throws ArgumentError if the JSON does not match.
Implementation
@override
BigInt decodeJsonTree(Object? json) {
if (json is num) {
return BigInt.from(json);
}
if (json is String) {
return decodeString(json);
}
throw ArgumentError.value(json);
}