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['name'] = name;
  result['kind'] = kind.toJson();
  result['fileIndex'] = fileIndex;
  result['offset'] = offset;
  result['line'] = line;
  result['column'] = column;
  result['codeOffset'] = codeOffset;
  result['codeLength'] = codeLength;
  var className = this.className;
  if (className != null) {
    result['className'] = className;
  }
  var mixinName = this.mixinName;
  if (mixinName != null) {
    result['mixinName'] = mixinName;
  }
  var parameters = this.parameters;
  if (parameters != null) {
    result['parameters'] = parameters;
  }
  return result;
}