AnalysisAnalyzedFilesParams.fromJson constructor
AnalysisAnalyzedFilesParams.fromJson(
- JsonDecoder jsonDecoder,
- String jsonPath,
- Object? json
)
Implementation
factory AnalysisAnalyzedFilesParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
List<String> directories;
if (json.containsKey('directories')) {
directories = jsonDecoder.decodeList('$jsonPath.directories',
json['directories'], jsonDecoder.decodeString);
} else {
throw jsonDecoder.mismatch(jsonPath, 'directories');
}
return AnalysisAnalyzedFilesParams(directories);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.analyzedFiles params', json);
}
}