net.optionfactory.spring.time.jackson.adapters.ZoneIdAsIdString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of time-jackson Show documentation
Show all versions of time-jackson Show documentation
optionfactory-spring jackson time serializers/deserializers
package net.optionfactory.spring.time.jackson.adapters;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.time.ZoneId;
public class ZoneIdAsIdString extends JsonSerializer {
@Override
public void serialize(ZoneId value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
gen.writeString(value.toString());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy