toJson method

  1. @override
Map<String, Object> toJson()

Returns a JSON presentation of the object.

Implementation

@override
Map<String, Object> toJson() {
  var result = <String, Object>{};
  var suggestions = this.suggestions;
  if (suggestions != null) {
    result['suggestions'] = suggestions
        .map((CompletionSuggestion value) => value.toJson())
        .toList();
  }
  var expressions = this.expressions;
  if (expressions != null) {
    result['expressions'] = expressions
        .map((RuntimeCompletionExpression value) => value.toJson())
        .toList();
  }
  return result;
}