toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'command': command,
      if (arguments.isNotEmpty) 'arguments': arguments,
      if (workingDirectory != null) 'working-directory': workingDirectory,
      if (environment.isNotEmpty) 'environment': environment,
      if (timeout != null) 'timeout': formatDurationValue(timeout!),
      'on': on.name,
      if (continueOnError) 'continue-on-error': true,
    };