toJson method

Map<String, Object> toJson()

Converts a ResourceMetricStatus instance to JSON data.

Implementation

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

  final tempCurrent = current;
  final tempName = name;

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

  jsonData['name'] = tempName;

  return jsonData;
}