toJson method
Implementation
Map<String, dynamic> toJson() => {
'source': source.name,
'fromJson': fromJson,
'sourceLabel': sourceLabel,
if (sourcePath != null && sourcePath!.isNotEmpty) 'sourcePath': sourcePath,
'policy': policy.toJson(),
};