All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy