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>{};
  result['kind'] = kind.toJson();
  result['relevance'] = relevance;
  result['completion'] = completion;
  var displayText = this.displayText;
  if (displayText != null) {
    result['displayText'] = displayText;
  }
  var replacementOffset = this.replacementOffset;
  if (replacementOffset != null) {
    result['replacementOffset'] = replacementOffset;
  }
  var replacementLength = this.replacementLength;
  if (replacementLength != null) {
    result['replacementLength'] = replacementLength;
  }
  result['selectionOffset'] = selectionOffset;
  result['selectionLength'] = selectionLength;
  result['isDeprecated'] = isDeprecated;
  result['isPotential'] = isPotential;
  var docSummary = this.docSummary;
  if (docSummary != null) {
    result['docSummary'] = docSummary;
  }
  var docComplete = this.docComplete;
  if (docComplete != null) {
    result['docComplete'] = docComplete;
  }
  var declaringType = this.declaringType;
  if (declaringType != null) {
    result['declaringType'] = declaringType;
  }
  var defaultArgumentListString = this.defaultArgumentListString;
  if (defaultArgumentListString != null) {
    result['defaultArgumentListString'] = defaultArgumentListString;
  }
  var defaultArgumentListTextRanges = this.defaultArgumentListTextRanges;
  if (defaultArgumentListTextRanges != null) {
    result['defaultArgumentListTextRanges'] = defaultArgumentListTextRanges;
  }
  var element = this.element;
  if (element != null) {
    result['element'] = element.toJson();
  }
  var returnType = this.returnType;
  if (returnType != null) {
    result['returnType'] = returnType;
  }
  var parameterNames = this.parameterNames;
  if (parameterNames != null) {
    result['parameterNames'] = parameterNames;
  }
  var parameterTypes = this.parameterTypes;
  if (parameterTypes != null) {
    result['parameterTypes'] = parameterTypes;
  }
  var requiredParameterCount = this.requiredParameterCount;
  if (requiredParameterCount != null) {
    result['requiredParameterCount'] = requiredParameterCount;
  }
  var hasNamedParameters = this.hasNamedParameters;
  if (hasNamedParameters != null) {
    result['hasNamedParameters'] = hasNamedParameters;
  }
  var parameterName = this.parameterName;
  if (parameterName != null) {
    result['parameterName'] = parameterName;
  }
  var parameterType = this.parameterType;
  if (parameterType != null) {
    result['parameterType'] = parameterType;
  }
  var libraryUri = this.libraryUri;
  if (libraryUri != null) {
    result['libraryUri'] = libraryUri;
  }
  var isNotImported = this.isNotImported;
  if (isNotImported != null) {
    result['isNotImported'] = isNotImported;
  }
  return result;
}