cloud.genesys.webmessaging.sdk.extensions.LocalDateSerializer Maven / Gradle / Ivy
package cloud.genesys.webmessaging.sdk;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.time.LocalDate;
public class LocalDateSerializer extends StdSerializer {
public LocalDateSerializer() {
this(null);
}
public LocalDateSerializer(Class t) {
super(t);
}
@Override
public void serialize(
LocalDate value, JsonGenerator jgen, SerializerProvider provider)
throws IOException {
jgen.writeString(value.toString());
}
}