toJson method

Map<String, dynamic> toJson()

Emits only the honored/requested fields (booleans only when true, URIs only when non-empty) — matching the acknowledged-subset 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,
    };