toJson method
Returns a JSON presentation of the object.
Implementation
@override
Map<String, Object> toJson() {
var result = <String, Object>{};
result['id'] = id;
result['replacementOffset'] = replacementOffset;
result['replacementLength'] = replacementLength;
result['results'] =
results.map((CompletionSuggestion value) => value.toJson()).toList();
result['isLast'] = isLast;
var libraryFile = this.libraryFile;
if (libraryFile != null) {
result['libraryFile'] = libraryFile;
}
var includedSuggestionSets = this.includedSuggestionSets;
if (includedSuggestionSets != null) {
result['includedSuggestionSets'] = includedSuggestionSets
.map((IncludedSuggestionSet value) => value.toJson())
.toList();
}
var includedElementKinds = this.includedElementKinds;
if (includedElementKinds != null) {
result['includedElementKinds'] = includedElementKinds
.map((ElementKind value) => value.toJson())
.toList();
}
var includedSuggestionRelevanceTags = this.includedSuggestionRelevanceTags;
if (includedSuggestionRelevanceTags != null) {
result['includedSuggestionRelevanceTags'] =
includedSuggestionRelevanceTags
.map((IncludedSuggestionRelevanceTag value) => value.toJson())
.toList();
}
return result;
}