toJson method
Converts a IngressClassSpec instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempController = controller;
final tempParameters = parameters;
if (tempController != null) {
jsonData['controller'] = tempController;
}
if (tempParameters != null) {
jsonData['parameters'] = tempParameters.toJson();
}
return jsonData;
}