toJson method

Map<String, Object> toJson()

Converts a PersistentVolumeClaimVolumeSource instance to JSON data.

Implementation

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

  jsonData['claimName'] = claimName;
  if (readOnly != null) {
    jsonData['readOnly'] = readOnly!;
  }

  return jsonData;
}