com.geotab.model.serialization.serdes.FaultStatusAsStringSerializer Maven / Gradle / Ivy
package com.geotab.model.serialization.serdes;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.geotab.model.entity.faultdata.FaultStatus;
import java.io.IOException;
public class FaultStatusAsStringSerializer extends JsonSerializer {
@Override
public void serialize(FaultStatus faultStatus, JsonGenerator jsonGenerator, SerializerProvider serializerProvider)
throws IOException {
jsonGenerator.writeString(faultStatus.getId().getId());
}
}