toJson method
Converts a HTTPIngressPath instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempBackend = backend;
final tempPath = path;
final tempPathType = pathType;
jsonData['backend'] = tempBackend.toJson();
if (tempPath != null) {
jsonData['path'] = tempPath;
}
jsonData['pathType'] = tempPathType;
return jsonData;
}