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