Moved pure ONOS code in net.floodlightcontroller.util.serializers to onos package namespace
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4Serializer.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4Serializer.java
new file mode 100644
index 0000000..49dc140
--- /dev/null
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4Serializer.java
@@ -0,0 +1,25 @@
+package net.onrc.onos.ofcontroller.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.onrc.onos.ofcontroller.util.IPv4;
+
+/**
+ * Serialize an IPv4 address as a string.
+ */
+public class IPv4Serializer extends JsonSerializer<IPv4> {
+
+ @Override
+ public void serialize(IPv4 ipv4, JsonGenerator jGen,
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeStartObject();
+ jGen.writeStringField("value", ipv4.toString());
+ jGen.writeEndObject();
+ }
+}