toJson method

Map<String, Object> toJson()

Converts a ObjectMetricSource instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempDescribedObject = describedObject;
  final tempMetric = metric;
  final tempTarget = target;

  jsonData['describedObject'] = tempDescribedObject.toJson();

  jsonData['metric'] = tempMetric.toJson();

  jsonData['target'] = tempTarget.toJson();

  return jsonData;
}