toJson method

Map<String, Object> toJson()

Converts a ContainerResourceMetricStatus instance to JSON data.

Implementation

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

  final tempContainer = container;
  final tempCurrent = current;
  final tempName = name;

  jsonData['container'] = tempContainer;

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

  jsonData['name'] = tempName;

  return jsonData;
}