* Use the "@JsonProperty()" annotation to serialize/deserialize
objects that don't require any specialized processing.
Use "@JsonSerialize" and "@JsonDeserialize" only for objects
that need more specialized processing.
* Remove FooSerializer JSON classes that are not used/needed anymore.
* Update the implementation of remaining FooSerializer classes,
and associated Foo classes.
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/CallerIdSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/CallerIdSerializer.java
deleted file mode 100644
index 9935324..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/CallerIdSerializer.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.CallerId;
-
-/**
- * Serialize a Caller ID as a string.
- */
-public class CallerIdSerializer extends JsonSerializer<CallerId> {
-
- @Override
- public void serialize(CallerId callerId, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeString(callerId.toString());
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/DataPathEndpointsSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/DataPathEndpointsSerializer.java
deleted file mode 100644
index e05c21d..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/DataPathEndpointsSerializer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.DataPathEndpoints;
-
-/**
- * Serialize a DataPathEndpoints as a string.
- */
-public class DataPathEndpointsSerializer extends JsonSerializer<DataPathEndpoints> {
-
- @Override
- public void serialize(DataPathEndpoints dataPathEndpoints,
- JsonGenerator jGen, SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeObjectField("srcPort", dataPathEndpoints.srcPort());
- jGen.writeObjectField("dstPort", dataPathEndpoints.dstPort());
- jGen.writeEndObject();
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/DataPathSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/DataPathSerializer.java
deleted file mode 100644
index d150c37..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/DataPathSerializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.DataPath;
-import net.floodlightcontroller.util.FlowEntry;
-
-/**
- * Serialize a DataPath as a string.
- */
-public class DataPathSerializer extends JsonSerializer<DataPath> {
-
- @Override
- public void serialize(DataPath dataPath,
- JsonGenerator jGen, SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeObjectField("srcPort", dataPath.srcPort());
- jGen.writeArrayFieldStart("flowEntries");
- for (FlowEntry fe: dataPath.flowEntries()) {
- jGen.writeObject(fe);
- }
- jGen.writeEndArray();
- jGen.writeObjectField("dstPort", dataPath.dstPort());
- jGen.writeEndObject();
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/DpidDeserializer.java b/src/main/java/net/floodlightcontroller/util/serializers/DpidDeserializer.java
new file mode 100644
index 0000000..9297f56
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/util/serializers/DpidDeserializer.java
@@ -0,0 +1,43 @@
+package net.floodlightcontroller.util.serializers;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonToken;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.ObjectCodec;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.DeserializationContext;
+
+import net.floodlightcontroller.util.Dpid;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Deserialize a DPID from a string.
+ */
+public class DpidDeserializer extends JsonDeserializer<Dpid> {
+
+ protected static Logger log = LoggerFactory.getLogger(DpidDeserializer.class);
+
+ @Override
+ public Dpid deserialize(JsonParser jp,
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ Dpid dpid = null;
+
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: " + fieldname + " Value: " + value);
+ dpid = new Dpid(value);
+ }
+ }
+ return dpid;
+ }
+}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryActionsSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryActionsSerializer.java
deleted file mode 100644
index bd5970d..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryActionsSerializer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.FlowEntryActions;
-
-/**
- * Serialize a FlowEntryActions as a string.
- */
-public class FlowEntryActionsSerializer extends JsonSerializer<FlowEntryActions> {
-
- @Override
- public void serialize(FlowEntryActions flowEntryActions,
- JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeObject(flowEntryActions);
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryErrorStateSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryErrorStateSerializer.java
deleted file mode 100644
index 2518e86..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryErrorStateSerializer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.FlowEntryErrorState;
-
-/**
- * Serialize a Flow Entry Error State as a string.
- */
-public class FlowEntryErrorStateSerializer extends JsonSerializer<FlowEntryErrorState> {
-
- @Override
- public void serialize(FlowEntryErrorState flowEntryErrorState,
- JsonGenerator jGen, SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeNumberField("type", flowEntryErrorState.type());
- jGen.writeNumberField("code", flowEntryErrorState.code());
- jGen.writeEndObject();
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryIdDeserializer.java b/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryIdDeserializer.java
new file mode 100644
index 0000000..e6481d5
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryIdDeserializer.java
@@ -0,0 +1,43 @@
+package net.floodlightcontroller.util.serializers;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonToken;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.ObjectCodec;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.DeserializationContext;
+
+import net.floodlightcontroller.util.FlowEntryId;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Deserialize a Flow Entry ID from a string.
+ */
+public class FlowEntryIdDeserializer extends JsonDeserializer<FlowEntryId> {
+
+ protected static Logger log = LoggerFactory.getLogger(FlowEntryIdDeserializer.class);
+
+ @Override
+ public FlowEntryId deserialize(JsonParser jp,
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ FlowEntryId flowEntryId = null;
+
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: " + fieldname + " Value: " + value);
+ flowEntryId = new FlowEntryId(value);
+ }
+ }
+ return flowEntryId;
+ }
+}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryMatchSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryMatchSerializer.java
deleted file mode 100644
index 0de3b08..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntryMatchSerializer.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.FlowEntryMatch;
-
-/**
- * Serialize a FlowEntryMatch as a string.
- */
-public class FlowEntryMatchSerializer extends JsonSerializer<FlowEntryMatch> {
-
- @Override
- public void serialize(FlowEntryMatch flowEntryMatch,
- JsonGenerator jGen, SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeObjectField("srcMac", flowEntryMatch.srcMac());
- jGen.writeObjectField("dstMac", flowEntryMatch.dstMac());
- jGen.writeObjectField("srcIPv4Net", flowEntryMatch.srcIPv4Net());
- jGen.writeObjectField("dstIPv4Net", flowEntryMatch.dstIPv4Net());
- jGen.writeEndObject();
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntrySerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/FlowEntrySerializer.java
deleted file mode 100644
index 9912d55..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/FlowEntrySerializer.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.FlowEntry;
-
-/**
- * Serialize a FlowEntry as a string.
- */
-public class FlowEntrySerializer extends JsonSerializer<FlowEntry> {
-
- @Override
- public void serialize(FlowEntry flowEntry,
- JsonGenerator jGen, SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeObjectField("flowEntryId", flowEntry.flowEntryId());
- jGen.writeObjectField("flowEntryMatch", flowEntry.flowEntryMatch());
- jGen.writeObjectField("flowEntryActions",
- flowEntry.flowEntryActions());
- jGen.writeObjectField("dpid", flowEntry.dpid());
- jGen.writeObjectField("inPort", flowEntry.inPort());
- jGen.writeObjectField("outPort", flowEntry.outPort());
- jGen.writeObjectField("flowEntryUserState",
- flowEntry.flowEntryUserState());
- jGen.writeObjectField("flowEntrySwitchState",
- flowEntry.flowEntrySwitchState());
- jGen.writeObjectField("flowEntryErrorState",
- flowEntry.flowEntryErrorState());
- jGen.writeEndObject();
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/FlowIdDeserializer.java b/src/main/java/net/floodlightcontroller/util/serializers/FlowIdDeserializer.java
new file mode 100644
index 0000000..a7f53d4
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/util/serializers/FlowIdDeserializer.java
@@ -0,0 +1,43 @@
+package net.floodlightcontroller.util.serializers;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonToken;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.ObjectCodec;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.DeserializationContext;
+
+import net.floodlightcontroller.util.FlowId;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Deserialize a Flow ID from a string.
+ */
+public class FlowIdDeserializer extends JsonDeserializer<FlowId> {
+
+ protected static Logger log = LoggerFactory.getLogger(FlowIdDeserializer.class);
+
+ @Override
+ public FlowId deserialize(JsonParser jp,
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ FlowId flowId = null;
+
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: " + fieldname + " Value: " + value);
+ flowId = new FlowId(value);
+ }
+ }
+ return flowId;
+ }
+}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/FlowPathSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/FlowPathSerializer.java
deleted file mode 100644
index a6a5405..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/FlowPathSerializer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.FlowPath;
-
-/**
- * Serialize a FlowPath as a string.
- */
-public class FlowPathSerializer extends JsonSerializer<FlowPath> {
-
- @Override
- public void serialize(FlowPath flowPath,
- JsonGenerator jGen, SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeObjectField("flowId", flowPath.flowId());
- jGen.writeObjectField("installerId", flowPath.installerId());
- jGen.writeObjectField("dataPath", flowPath.dataPath());
- jGen.writeEndObject();
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/IPv4Deserializer.java b/src/main/java/net/floodlightcontroller/util/serializers/IPv4Deserializer.java
new file mode 100644
index 0000000..7ce7d5c
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/util/serializers/IPv4Deserializer.java
@@ -0,0 +1,43 @@
+package net.floodlightcontroller.util.serializers;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonToken;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.ObjectCodec;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.DeserializationContext;
+
+import net.floodlightcontroller.util.IPv4;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Deserialize an IPv4 from a string.
+ */
+public class IPv4Deserializer extends JsonDeserializer<IPv4> {
+
+ protected static Logger log = LoggerFactory.getLogger(IPv4Deserializer.class);
+
+ @Override
+ public IPv4 deserialize(JsonParser jp,
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ IPv4 ipv4 = null;
+
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: " + fieldname + " Value: " + value);
+ ipv4 = new IPv4(value);
+ }
+ }
+ return ipv4;
+ }
+}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/IPv4NetDeserializer.java b/src/main/java/net/floodlightcontroller/util/serializers/IPv4NetDeserializer.java
new file mode 100644
index 0000000..e35fc80
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/util/serializers/IPv4NetDeserializer.java
@@ -0,0 +1,43 @@
+package net.floodlightcontroller.util.serializers;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonToken;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.ObjectCodec;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.DeserializationContext;
+
+import net.floodlightcontroller.util.IPv4Net;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Deserialize an IPv4Net from a string.
+ */
+public class IPv4NetDeserializer extends JsonDeserializer<IPv4Net> {
+
+ protected static Logger log = LoggerFactory.getLogger(IPv4NetDeserializer.class);
+
+ @Override
+ public IPv4Net deserialize(JsonParser jp,
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ IPv4Net ipv4Net = null;
+
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: " + fieldname + " Value: " + value);
+ ipv4Net = new IPv4Net(value);
+ }
+ }
+ return ipv4Net;
+ }
+}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/IPv6Deserializer.java b/src/main/java/net/floodlightcontroller/util/serializers/IPv6Deserializer.java
new file mode 100644
index 0000000..6713f93
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/util/serializers/IPv6Deserializer.java
@@ -0,0 +1,43 @@
+package net.floodlightcontroller.util.serializers;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonToken;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.ObjectCodec;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.DeserializationContext;
+
+import net.floodlightcontroller.util.IPv6;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Deserialize an IPv6 from a string.
+ */
+public class IPv6Deserializer extends JsonDeserializer<IPv6> {
+
+ protected static Logger log = LoggerFactory.getLogger(IPv6Deserializer.class);
+
+ @Override
+ public IPv6 deserialize(JsonParser jp,
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ IPv6 ipv6 = null;
+
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: " + fieldname + " Value: " + value);
+ ipv6 = new IPv6(value);
+ }
+ }
+ return ipv6;
+ }
+}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/IPv6NetDeserializer.java b/src/main/java/net/floodlightcontroller/util/serializers/IPv6NetDeserializer.java
new file mode 100644
index 0000000..596ee50
--- /dev/null
+++ b/src/main/java/net/floodlightcontroller/util/serializers/IPv6NetDeserializer.java
@@ -0,0 +1,43 @@
+package net.floodlightcontroller.util.serializers;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonToken;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.ObjectCodec;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.DeserializationContext;
+
+import net.floodlightcontroller.util.IPv6Net;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Deserialize an IPv6Net from a string.
+ */
+public class IPv6NetDeserializer extends JsonDeserializer<IPv6Net> {
+
+ protected static Logger log = LoggerFactory.getLogger(IPv6NetDeserializer.class);
+
+ @Override
+ public IPv6Net deserialize(JsonParser jp,
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ IPv6Net ipv6Net = null;
+
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: " + fieldname + " Value: " + value);
+ ipv6Net = new IPv6Net(value);
+ }
+ }
+ return ipv6Net;
+ }
+}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/PortSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/PortSerializer.java
deleted file mode 100644
index e79c600..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/PortSerializer.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.Port;
-
-/**
- * Serialize a Port as a string.
- */
-public class PortSerializer extends JsonSerializer<Port> {
-
- @Override
- public void serialize(Port port, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeNumber(port.value());
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/util/serializers/SwitchPortSerializer.java b/src/main/java/net/floodlightcontroller/util/serializers/SwitchPortSerializer.java
deleted file mode 100644
index 8abbb52..0000000
--- a/src/main/java/net/floodlightcontroller/util/serializers/SwitchPortSerializer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package net.floodlightcontroller.util.serializers;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import net.floodlightcontroller.util.SwitchPort;
-
-/**
- * Serialize a SwitchPort as a string.
- */
-public class SwitchPortSerializer extends JsonSerializer<SwitchPort> {
-
- @Override
- public void serialize(SwitchPort switchPort,
- JsonGenerator jGen, SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeObjectField("dpid", switchPort.dpid());
- jGen.writeObjectField("port", switchPort.port());
- jGen.writeEndObject();
- }
-}