ph.com.nightowlstudios.entity.serializer.LocalDateSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of edge Show documentation
Show all versions of edge Show documentation
A simple library for building REST API using Vertx.
package ph.com.nightowlstudios.entity.serializer;
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;
/**
* @author Joseph Harvey Angeles - yev
* @since 8/11/21
**/
public class LocalDateSerializer extends StdSerializer {
protected LocalDateSerializer() {
this(LocalDate.class);
}
protected LocalDateSerializer(Class t) {
super(t);
}
@Override
public void serialize(LocalDate value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeString(value.toString());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy