toJson method

Map<String, dynamic> toJson()

Implementation

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