toJson method

Map<String, Object> toJson()

Converts a ResourceMetricSource instance to JSON data.

Implementation

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

  final tempName = name;
  final tempTarget = target;

  jsonData['name'] = tempName;

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

  return jsonData;
}