toJson method
Converts a MetricIdentifier instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempName = name;
final tempSelector = selector;
jsonData['name'] = tempName;
if (tempSelector != null) {
jsonData['selector'] = tempSelector.toJson();
}
return jsonData;
}