CompletionRegisterLibraryPathsParams.fromJson constructor
CompletionRegisterLibraryPathsParams.fromJson()
Implementation
factory CompletionRegisterLibraryPathsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
List<LibraryPathSet> paths;
if (json.containsKey('paths')) {
paths = jsonDecoder.decodeList(
'$jsonPath.paths',
json['paths'],
(String jsonPath, Object? json) =>
LibraryPathSet.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'paths');
}
return CompletionRegisterLibraryPathsParams(paths);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'completion.registerLibraryPaths params', json);
}
}