toJson method

Map<String, dynamic> toJson()

Convert capabilities to JSON

Implementation

Map<String, dynamic> toJson() {
  final result = <String, dynamic>{};

  if (roots) {
    result['roots'] = {'listChanged': rootsListChanged};
  }

  if (sampling) {
    result['sampling'] = {};
  }

  if (elicitation) {
    result['elicitation'] = {};
  }

  return result;
}