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