io.vrap.rmf.base.client.utils.json.modules.ZonedDateTimeSerializationModule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rmf-java-base Show documentation
Show all versions of rmf-java-base Show documentation
The e-commerce SDK from commercetools Composable Commerce for Java
package io.vrap.rmf.base.client.utils.json.modules;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZonedDateTime;
import com.fasterxml.jackson.databind.module.SimpleModule;
import io.vrap.rmf.base.client.utils.json.modules.serializers.LocalDateSerializer;
import io.vrap.rmf.base.client.utils.json.modules.serializers.LocalTimeSerializer;
import io.vrap.rmf.base.client.utils.json.modules.serializers.ZonedDateTimeSerializer;
public class ZonedDateTimeSerializationModule extends SimpleModule {
public ZonedDateTimeSerializationModule() {
addSerializer(LocalDate.class, new LocalDateSerializer());
addSerializer(LocalTime.class, new LocalTimeSerializer());
addSerializer(ZonedDateTime.class, new ZonedDateTimeSerializer());
}
}