![JAR search and dependency download from the Maven repository](/logo.png)
net.aholbrook.paseto.encoding.json.jackson.OffsetDateTimeSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of encoding-json-jackson Show documentation
Show all versions of encoding-json-jackson Show documentation
JSON encoding backed by Jackson.
package net.aholbrook.paseto.encoding.json.jackson;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import net.aholbrook.paseto.service.Token;
import java.io.IOException;
import java.time.OffsetDateTime;
public class OffsetDateTimeSerializer extends JsonSerializer {
@Override
public void serialize(OffsetDateTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
gen.writeString(Token.DATETIME_FORMATTER.format(value));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy