Map<String, dynamic> toJson() { return { "name": type, "connectedNode": connectedInterface?.toJson(), }; }