toJson method
Emits only the requested fields (booleans only when true, URIs only when
non-empty) — matching the SubscriptionsListenRequestParams.notifications
shape.
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
if (toolsListChanged) 'toolsListChanged': true,
if (promptsListChanged) 'promptsListChanged': true,
if (resourcesListChanged) 'resourcesListChanged': true,
if (resourceSubscriptions.isNotEmpty)
'resourceSubscriptions': resourceSubscriptions,
};