SearchFindTopLevelDeclarationsResult.fromJson constructor
SearchFindTopLevelDeclarationsResult.fromJson()
Implementation
factory SearchFindTopLevelDeclarationsResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
String id;
if (json.containsKey('id')) {
id = jsonDecoder.decodeString('$jsonPath.id', json['id']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'id');
}
return SearchFindTopLevelDeclarationsResult(id);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'search.findTopLevelDeclarations result', json);
}
}