toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  'name': name,
  if (detail != null) 'detail': detail,
  'kind': kind,
  'range': range.toJson(),
  'selectionRange': selectionRange.toJson(),
  if (children.isNotEmpty)
    'children': children.map((c) => c.toJson()).toList(),
};