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