toJson method
Converts a ResourceFieldSelector instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempContainerName = containerName;
final tempDivisor = divisor;
final tempResource = resource;
if (tempContainerName != null) {
jsonData['containerName'] = tempContainerName;
}
if (tempDivisor != null) {
jsonData['divisor'] = tempDivisor;
}
jsonData['resource'] = tempResource;
return jsonData;
}