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 libraryPath = this.libraryPath;
  if (libraryPath != null) {
    result['libraryPath'] = libraryPath;
  }
  result['kind'] = kind.toJson();
  var name = this.name;
  if (name != null) {
    result['name'] = name;
  }
  var typeArguments = this.typeArguments;
  if (typeArguments != null) {
    result['typeArguments'] = typeArguments
        .map((RuntimeCompletionExpressionType value) => value.toJson())
        .toList();
  }
  var returnType = this.returnType;
  if (returnType != null) {
    result['returnType'] = returnType.toJson();
  }
  var parameterTypes = this.parameterTypes;
  if (parameterTypes != null) {
    result['parameterTypes'] = parameterTypes
        .map((RuntimeCompletionExpressionType value) => value.toJson())
        .toList();
  }
  var parameterNames = this.parameterNames;
  if (parameterNames != null) {
    result['parameterNames'] = parameterNames;
  }
  return result;
}