CompletionGetSuggestionsResult.fromJson constructor
CompletionGetSuggestionsResult.fromJson(
- JsonDecoder jsonDecoder,
- String jsonPath,
- Object? json
)
Implementation
factory CompletionGetSuggestionsResult.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 CompletionGetSuggestionsResult(id);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'completion.getSuggestions result', json);
}
}