Custom serializer for IOFSwitch.
The default serialization now breaks when it tries to serialize the OFFactory.
Also using a custom serializer provides better information for debugging.
Change-Id: Ib180681ddde879186425025fa551bbd891d3ee7a
diff --git a/src/main/java/net/floodlightcontroller/core/IOFSwitch.java b/src/main/java/net/floodlightcontroller/core/IOFSwitch.java
index 530da78..40aa530 100644
--- a/src/main/java/net/floodlightcontroller/core/IOFSwitch.java
+++ b/src/main/java/net/floodlightcontroller/core/IOFSwitch.java
@@ -26,11 +26,13 @@
import java.util.concurrent.Future;
import net.floodlightcontroller.core.IFloodlightProviderService.Role;
+import net.floodlightcontroller.core.web.serializers.IOFSwitchSerializer;
import net.floodlightcontroller.debugcounter.IDebugCounterService;
import net.floodlightcontroller.debugcounter.IDebugCounterService.CounterException;
import net.floodlightcontroller.threadpool.IThreadPoolService;
import net.floodlightcontroller.util.OrderedCollection;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.jboss.netty.channel.Channel;
import org.projectfloodlight.openflow.protocol.OFActionType;
import org.projectfloodlight.openflow.protocol.OFCapabilities;
@@ -44,7 +46,7 @@
import org.projectfloodlight.openflow.protocol.OFVersion;
import org.projectfloodlight.openflow.types.U64;
-
+@JsonSerialize(using = IOFSwitchSerializer.class)
public interface IOFSwitch {
/**