blob: 00f4d61e3a3df46633355636a0b01ebe8539c93c [file] [log] [blame]
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.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());
}
}