public class OffsetTimeSerializer
extends com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
OffsetTime
s.Modifier and Type | Field and Description |
---|---|
protected java.time.format.DateTimeFormatter |
_formatter
Specific format to use, if not default format: non null value
also indicates that serialization is to be done as JSON String,
not numeric timestamp, unless
_useTimestamp is true. |
protected Boolean |
_useTimestamp
Flag that indicates that serialization must be done as the
Java timestamp, regardless of other settings.
|
static OffsetTimeSerializer |
INSTANCE |
Modifier | Constructor and Description |
---|---|
protected |
OffsetTimeSerializer() |
protected |
OffsetTimeSerializer(OffsetTimeSerializer base,
Boolean useTimestamp,
java.time.format.DateTimeFormatter dtf) |
Modifier and Type | Method and Description |
---|---|
protected void |
_acceptTimestampVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor,
com.fasterxml.jackson.databind.JavaType typeHint) |
protected boolean |
_useTimestampExplicitOnly(com.fasterxml.jackson.databind.SerializerProvider provider) |
void |
acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor,
com.fasterxml.jackson.databind.JavaType typeHint) |
com.fasterxml.jackson.databind.JsonSerializer<?> |
createContextual(com.fasterxml.jackson.databind.SerializerProvider prov,
com.fasterxml.jackson.databind.BeanProperty property) |
com.fasterxml.jackson.databind.JsonNode |
getSchema(com.fasterxml.jackson.databind.SerializerProvider provider,
Type typeHint) |
void |
serialize(java.time.OffsetTime time,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
void |
serializeWithType(T value,
com.fasterxml.jackson.core.JsonGenerator generator,
com.fasterxml.jackson.databind.SerializerProvider provider,
com.fasterxml.jackson.databind.jsontype.TypeSerializer serializer) |
protected boolean |
useTimestamp(com.fasterxml.jackson.databind.SerializerProvider provider) |
protected com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase<?> |
withFeatures(Boolean writeZoneId) |
protected OffsetTimeSerializer |
withFormat(Boolean useTimestamp,
java.time.format.DateTimeFormatter dtf) |
createObjectNode, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
public static final OffsetTimeSerializer INSTANCE
protected final Boolean _useTimestamp
protected final java.time.format.DateTimeFormatter _formatter
_useTimestamp
is true.protected OffsetTimeSerializer()
protected OffsetTimeSerializer(OffsetTimeSerializer base, Boolean useTimestamp, java.time.format.DateTimeFormatter dtf)
protected OffsetTimeSerializer withFormat(Boolean useTimestamp, java.time.format.DateTimeFormatter dtf)
public void serialize(java.time.OffsetTime time, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
serialize
in class com.fasterxml.jackson.databind.ser.std.StdSerializer<java.time.OffsetTime>
IOException
protected com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase<?> withFeatures(Boolean writeZoneId)
public com.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
createContextual
in interface com.fasterxml.jackson.databind.ser.ContextualSerializer
com.fasterxml.jackson.databind.JsonMappingException
public com.fasterxml.jackson.databind.JsonNode getSchema(com.fasterxml.jackson.databind.SerializerProvider provider, Type typeHint)
getSchema
in interface com.fasterxml.jackson.databind.jsonschema.SchemaAware
getSchema
in class com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
public void acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor, com.fasterxml.jackson.databind.JavaType typeHint) throws com.fasterxml.jackson.databind.JsonMappingException
acceptJsonFormatVisitor
in interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
acceptJsonFormatVisitor
in class com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
com.fasterxml.jackson.databind.JsonMappingException
protected void _acceptTimestampVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor, com.fasterxml.jackson.databind.JavaType typeHint) throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException
protected boolean useTimestamp(com.fasterxml.jackson.databind.SerializerProvider provider)
protected boolean _useTimestampExplicitOnly(com.fasterxml.jackson.databind.SerializerProvider provider)
public void serializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer serializer) throws IOException
serializeWithType
in class com.fasterxml.jackson.databind.JsonSerializer<T>
IOException
Copyright © 2016 FasterXML. All rights reserved.