toJson method
Converts a ServiceBackendPort instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempName = name;
final tempNumber = number;
if (tempName != null) {
jsonData['name'] = tempName;
}
if (tempNumber != null) {
jsonData['number'] = tempNumber;
}
return jsonData;
}