toJson method

Map<String, Object> toJson()

Converts a ContainerImage instance to JSON data.

Implementation

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

  final tempNames = names;
  final tempSizeBytes = sizeBytes;

  if (tempNames != null) {
    jsonData['names'] = tempNames;
  }

  if (tempSizeBytes != null) {
    jsonData['sizeBytes'] = tempSizeBytes;
  }

  return jsonData;
}