toJson method
Converts a EndpointAddress instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempHostname = hostname;
final tempIp = ip;
final tempNodeName = nodeName;
final tempTargetRef = targetRef;
if (tempHostname != null) {
jsonData['hostname'] = tempHostname;
}
jsonData['ip'] = tempIp;
if (tempNodeName != null) {
jsonData['nodeName'] = tempNodeName;
}
if (tempTargetRef != null) {
jsonData['targetRef'] = tempTargetRef.toJson();
}
return jsonData;
}