Class JodaDateSerializerBase<T>
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<T>
-
- com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
-
- com.fasterxml.jackson.datatype.joda.ser.JodaDateSerializerBase<T>
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
,com.fasterxml.jackson.databind.jsonschema.SchemaAware
,com.fasterxml.jackson.databind.ser.ContextualSerializer
,Serializable
- Direct Known Subclasses:
DateMidnightSerializer
,DateTimeSerializer
,DurationSerializer
,InstantSerializer
,IntervalSerializer
,LocalDateSerializer
,LocalDateTimeSerializer
,LocalTimeSerializer
,MonthDaySerializer
,YearMonthSerializer
public abstract class JodaDateSerializerBase<T> extends com.fasterxml.jackson.databind.ser.std.StdSerializer<T> implements com.fasterxml.jackson.databind.ser.ContextualSerializer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
_defaultNumericShape
Shape to use for generic "use numeric" feature (instead of more specific JsonFormat.shape).protected com.fasterxml.jackson.databind.SerializationFeature
_featureForNumeric
protected JacksonJodaDateFormat
_format
protected int
_shapeOverride
Marker set to non-0 if (and only if) property or type override exists.protected static int
FORMAT_ARRAY
protected static int
FORMAT_STRING
protected static int
FORMAT_TIMESTAMP
-
Constructor Summary
Constructors Modifier Constructor Description protected
JodaDateSerializerBase(Class<T> type, JacksonJodaDateFormat format, com.fasterxml.jackson.databind.SerializationFeature numericFeature, int defaultNumericShape, int shapeOverride)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
_serializationShape(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)
boolean
isEmpty(com.fasterxml.jackson.databind.SerializerProvider prov, T value)
void
serializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)
abstract JodaDateSerializerBase<T>
withFormat(JacksonJodaDateFormat format, int shapeOverride)
protected boolean
writeWithZoneId(com.fasterxml.jackson.databind.SerializerProvider provider)
-
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, serialize, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
-
-
-
-
Field Detail
-
FORMAT_STRING
protected static final int FORMAT_STRING
- See Also:
- Constant Field Values
-
FORMAT_TIMESTAMP
protected static final int FORMAT_TIMESTAMP
- See Also:
- Constant Field Values
-
FORMAT_ARRAY
protected static final int FORMAT_ARRAY
- See Also:
- Constant Field Values
-
_format
protected final JacksonJodaDateFormat _format
-
_featureForNumeric
protected final com.fasterxml.jackson.databind.SerializationFeature _featureForNumeric
-
_defaultNumericShape
protected final int _defaultNumericShape
Shape to use for generic "use numeric" feature (instead of more specific JsonFormat.shape).- Since:
- 2.9
-
_shapeOverride
protected final int _shapeOverride
Marker set to non-0 if (and only if) property or type override exists.- Since:
- 2.9
-
-
Constructor Detail
-
JodaDateSerializerBase
protected JodaDateSerializerBase(Class<T> type, JacksonJodaDateFormat format, com.fasterxml.jackson.databind.SerializationFeature numericFeature, int defaultNumericShape, int shapeOverride)
-
-
Method Detail
-
withFormat
public abstract JodaDateSerializerBase<T> withFormat(JacksonJodaDateFormat format, int shapeOverride)
- Since:
- 2.9
-
isEmpty
public boolean isEmpty(com.fasterxml.jackson.databind.SerializerProvider prov, T value)
- Overrides:
isEmpty
in classcom.fasterxml.jackson.databind.JsonSerializer<T>
-
createContextual
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
- Specified by:
createContextual
in interfacecom.fasterxml.jackson.databind.ser.ContextualSerializer
- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-
getSchema
public com.fasterxml.jackson.databind.JsonNode getSchema(com.fasterxml.jackson.databind.SerializerProvider provider, Type typeHint)
- Specified by:
getSchema
in interfacecom.fasterxml.jackson.databind.jsonschema.SchemaAware
- Overrides:
getSchema
in classcom.fasterxml.jackson.databind.ser.std.StdSerializer<T>
-
acceptJsonFormatVisitor
public void acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor, com.fasterxml.jackson.databind.JavaType typeHint) throws com.fasterxml.jackson.databind.JsonMappingException
- Specified by:
acceptJsonFormatVisitor
in interfacecom.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
- Overrides:
acceptJsonFormatVisitor
in classcom.fasterxml.jackson.databind.ser.std.StdSerializer<T>
- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-
writeWithZoneId
protected boolean writeWithZoneId(com.fasterxml.jackson.databind.SerializerProvider provider)
- Since:
- 2.8
-
_serializationShape
protected int _serializationShape(com.fasterxml.jackson.databind.SerializerProvider provider)
- Since:
- 2.9
-
serializeWithType
public void serializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) throws IOException
- Overrides:
serializeWithType
in classcom.fasterxml.jackson.databind.JsonSerializer<T>
- Throws:
IOException
-
-