toJson method
Implementation
Map<String, dynamic> toJson() {
if (raw != null) return raw!.toJson();
return {
if (tools) 'tools': {if (toolsListChanged) 'listChanged': true},
if (resources)
'resources': {
if (resourcesSubscribe) 'subscribe': true,
if (resourcesListChanged) 'listChanged': true,
},
if (prompts) 'prompts': {if (promptsListChanged) 'listChanged': true},
if (logging) 'logging': <String, dynamic>{},
if (completions) 'completions': <String, dynamic>{},
if (tasks != null) 'tasks': tasks,
if (experimental != null && experimental!.isNotEmpty) 'experimental': experimental,
if (extensions != null && extensions!.isNotEmpty) 'extensions': extensions,
};
}