blob: 4b6583c0c45234b31ba0d0d382eae8bfe8b18821 [file] [log] [blame]
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.FlowEntryId;
/**
* Serialize a Flow Entry ID as a hexadecimal string.
*/
public class FlowEntryIdSerializer extends JsonSerializer<FlowEntryId> {
@Override
public void serialize(FlowEntryId flowEntryId, JsonGenerator jGen,
SerializerProvider serializer)
throws IOException, JsonProcessingException {
jGen.writeString(flowEntryId.toString());
}
}