toJson method

Map<String, Object> toJson()

Converts a NodeAddress instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempAddress = address;
  final tempType = type;

  jsonData['address'] = tempAddress;

  jsonData['type'] = tempType;

  return jsonData;
}