toJson method

Map<String, Object> toJson()

Converts a ObjectMetricStatus instance to JSON data.

Implementation

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

  final tempCurrent = current;
  final tempDescribedObject = describedObject;
  final tempMetric = metric;

  jsonData['current'] = tempCurrent.toJson();

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

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

  return jsonData;
}