toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'config': config.toJson(),
'artifacts': artifacts
.map((e) => {
'type': e is File ? 'file' : 'directory',
'path': e.path,
})
.toList(),
'duration': duration,
}..removeWhere((key, value) => value == null);
}