ComputeTokensResponse.fromJson constructor
ComputeTokensResponse.fromJson(
- Object? j
Implementation
factory ComputeTokensResponse.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ComputeTokensResponse(
tokensInfo: switch (json['tokensInfo']) {
null => [],
List<Object?> $1 => [for (final i in $1) TokensInfo.fromJson(i)],
_ => throw const FormatException('"tokensInfo" is not a list'),
},
);
}