toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  'name': name,
  'type': type,
  if (optional) 'optional': true,
  if (doc != null) 'doc': doc,
  if (shape != null) 'shape': shape!.toJson(),
};