cloud.genesys.webmessaging.sdk.extensions.LocalDateSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of web-messaging-sdk Show documentation
Show all versions of web-messaging-sdk Show documentation
A customer-side development kit for creating custom Genesys Cloud Web Messaging experiences
The newest version!
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());
}
}