ExtractLocalVariableOptions.fromJson constructor
ExtractLocalVariableOptions.fromJson(})
Implementation
factory ExtractLocalVariableOptions.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is Map) {
String name;
if (json.containsKey('name')) {
name = jsonDecoder.decodeString('$jsonPath.name', json['name']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'name');
}
bool extractAll;
if (json.containsKey('extractAll')) {
extractAll = jsonDecoder.decodeBool(
'$jsonPath.extractAll',
json['extractAll'],
);
} else {
throw jsonDecoder.mismatch(jsonPath, 'extractAll');
}
return ExtractLocalVariableOptions(name, extractAll);
} else {
throw jsonDecoder.mismatch(
jsonPath,
'extractLocalVariable options',
json,
);
}
}