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