toJson method

Map<String, Object?> toJson()

The JSON sent to Metro.

Implementation

Map<String, Object?> toJson() => {
  'name': name,
  'direction': direction,
  'log': log,
  'ms': ms,
  'failed': failed,
  if (error != null) 'error': error,
};