toJson method

Map<String, dynamic> toJson()

Converts to JSON.

Implementation

Map<String, dynamic> toJson() => {
  'type': type,
  'name': name,
  if (description != null) 'description': description,
  if (parameters != null) 'parameters': parameters,
};