toJson method
Implementation
Map<String, dynamic> toJson() => {
'title': title,
'kind': kind.value,
if (diagnostic != null) 'diagnostics': [diagnostic!.toJson()],
if (isPreferred) 'isPreferred': true,
if (edits != null) 'edit': {'changes': edits!.map((e) => e.toJson())},
if (command != null) 'command': command!.toJson(),
};