ErrorAnalysisAnnotation.fromJson constructor
ErrorAnalysisAnnotation.fromJson(
- Object? j
Implementation
factory ErrorAnalysisAnnotation.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ErrorAnalysisAnnotation(
attributedItems: switch (json['attributedItems']) {
null => [],
List<Object?> $1 => [
for (final i in $1)
ErrorAnalysisAnnotation_AttributedItem.fromJson(i),
],
_ => throw const FormatException('"attributedItems" is not a list'),
},
queryType: switch (json['queryType']) {
null => ErrorAnalysisAnnotation_QueryType.$default,
Object $1 => ErrorAnalysisAnnotation_QueryType.fromJson($1),
},
outlierScore: switch (json['outlierScore']) {
null => 0,
Object $1 => decodeDouble($1),
},
outlierThreshold: switch (json['outlierThreshold']) {
null => 0,
Object $1 => decodeDouble($1),
},
);
}