Top Fields Constructors Methods
com.fasterxml.jackson.datatype.joda.ser

public abstract Class JodaDateSerializerBase<T>

extends JodaSerializerBase<T>
implements ContextualSerializer
Class Inheritance
All Implemented Interfaces
com.fasterxml.jackson.databind.ser.ContextualSerializer
Known Direct Subclasses
com.fasterxml.jackson.datatype.joda.ser.LocalDateSerializer, com.fasterxml.jackson.datatype.joda.ser.LocalDateTimeSerializer, com.fasterxml.jackson.datatype.joda.ser.LocalTimeSerializer, com.fasterxml.jackson.datatype.joda.ser.MonthDaySerializer, com.fasterxml.jackson.datatype.joda.ser.YearMonthSerializer, com.fasterxml.jackson.datatype.joda.ser.DateMidnightSerializer, com.fasterxml.jackson.datatype.joda.ser.DateTimeSerializer, com.fasterxml.jackson.datatype.joda.ser.DurationSerializer, com.fasterxml.jackson.datatype.joda.ser.InstantSerializer, com.fasterxml.jackson.datatype.joda.ser.IntervalSerializer
Imports
com.fasterxml.jackson.annotation.JsonFormat, com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.jsonFormatVisitors.*, com.fasterxml.jackson.databind.ser.ContextualSerializer, com.fasterxml.jackson.datatype.joda.cfg.JacksonJodaDateFormat

References Deprecated

JodaSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
protected final int
_defaultNumericShape

Shape to use for generic "use numeric" feature (instead of more specific JsonFormat.shape).

protected final SerializationFeature
protected final JacksonJodaDateFormat
protected final int
_shapeOverride

Marker set to non-0 if (and only if) property or type override exists.

protected static final int
protected static final int
protected static final int
private static final long

Constructor Summary

AccessConstructor and Description
protected
JodaDateSerializerBase(Class<T> type, JacksonJodaDateFormat format, SerializationFeature numericFeature, int defaultNumericShape, int shapeOverride)

Method Summary

Modifier and TypeMethod and Description
protected int
public void
public JsonSerializer<?>
createContextual(SerializerProvider
Serializer provider to use for accessing config, other serializers
prov
,
BeanProperty
Method or field that represents the property (and is used to access value to serialize). Should be available; but there may be cases where caller cannot provide it and null is passed instead (in which case impls usually pass 'this' serializer as is)
property
)

Implements com.fasterxml.jackson.databind.ser.ContextualSerializer.createContextual.

Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property.

public JsonNode
getSchema(SerializerProvider
The serializer provider.
provider
,
Type
A hint about the type.
typeHint
)

Overrides com.fasterxml.jackson.databind.ser.std.StdSerializer.getSchema.

Implements com.fasterxml.jackson.databind.jsonschema.SchemaAware.getSchema.

Deprecated

Default implementation simply claims type is "string"; usually overriden by custom serializers.

public boolean
isEmpty(SerializerProvider prov, T value)

Overrides com.fasterxml.jackson.databind.JsonSerializer.isEmpty.

Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).

public abstract JodaDateSerializerBase<T>
withFormat(JacksonJodaDateFormat format, int shapeOverride)
References Deprecated JodaDateSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.

protected boolean
Inherited from com.fasterxml.jackson.datatype.joda.ser.JodaSerializerBase:
serializeWithType

Field Detail

_defaultNumericShapeback to summary
protected final int _defaultNumericShape

Shape to use for generic "use numeric" feature (instead of more specific JsonFormat.shape).

Since
2.9
_featureForNumericback to summary
protected final SerializationFeature _featureForNumeric
_formatback to summary
protected final JacksonJodaDateFormat _format
_shapeOverrideback to summary
protected final int _shapeOverride

Marker set to non-0 if (and only if) property or type override exists.

Since
2.9
FORMAT_ARRAYback to summary
protected static final int FORMAT_ARRAY
FORMAT_STRINGback to summary
protected static final int FORMAT_STRING
FORMAT_TIMESTAMPback to summary
protected static final int FORMAT_TIMESTAMP
serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.datatype.joda.ser.JodaSerializerBase.serialVersionUID.

Constructor Detail

JodaDateSerializerBaseback to summary
protected JodaDateSerializerBase(Class<T> type, JacksonJodaDateFormat format, SerializationFeature numericFeature, int defaultNumericShape, int shapeOverride)

Method Detail

_serializationShapeback to summary
protected int _serializationShape(SerializerProvider provider)
Since
2.9
acceptJsonFormatVisitorback to summary
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException

Overrides com.fasterxml.jackson.databind.ser.std.StdSerializer.acceptJsonFormatVisitor.

Implements com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable.acceptJsonFormatVisitor.

Doc from com.fasterxml.jackson.databind.ser.std.StdSerializer.acceptJsonFormatVisitor.

Default implementation specifies no format. This behavior is usually overriden by custom serializers.

Parameters
typeHint:JavaType

Doc from com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable.acceptJsonFormatVisitor.

Type of element (entity like property) being visited

Annotations
@Override
createContextualback to summary
public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property) throws JsonMappingException

Implements com.fasterxml.jackson.databind.ser.ContextualSerializer.createContextual.

Doc from com.fasterxml.jackson.databind.ser.ContextualSerializer.createContextual.

Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property. Note that instance that this method is called on is typically shared one and as a result method should NOT modify this instance but rather construct and return a new instance. This instance should only be returned as-is, in case it is already suitable for use.

Parameters
prov:SerializerProvider

Serializer provider to use for accessing config, other serializers

property:BeanProperty

Method or field that represents the property (and is used to access value to serialize). Should be available; but there may be cases where caller cannot provide it and null is passed instead (in which case impls usually pass 'this' serializer as is)

Returns:JsonSerializer<?>

Serializer to use for serializing values of specified property; may be this instance or a new instance.

Annotations
@Override
getSchemaback to summary
public JsonNode getSchema(SerializerProvider provider, Type typeHint)

Overrides com.fasterxml.jackson.databind.ser.std.StdSerializer.getSchema.

Implements com.fasterxml.jackson.databind.jsonschema.SchemaAware.getSchema.

Doc from com.fasterxml.jackson.databind.ser.std.StdSerializer.getSchema.

Deprecated

Default implementation simply claims type is "string"; usually overriden by custom serializers.

Parameters
provider:SerializerProvider

Doc from com.fasterxml.jackson.databind.jsonschema.SchemaAware.getSchema.

The serializer provider.

typeHint:Type

Doc from com.fasterxml.jackson.databind.jsonschema.SchemaAware.getSchema.

A hint about the type.

Returns:JsonNode

Doc from com.fasterxml.jackson.databind.jsonschema.SchemaAware.getSchema.

Json-schema for this serializer.

Annotations
@Override
@Deprecated
isEmptyback to summary
public boolean isEmpty(SerializerProvider prov, T value)

Overrides com.fasterxml.jackson.databind.JsonSerializer.isEmpty.

Doc from com.fasterxml.jackson.databind.JsonSerializer.isEmpty.

Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).

Default implementation will consider only null values to be empty.

Note

replaces isEmpty(Object), which was deprecated in 2.5

Annotations
@Override
withFormatback to summary
public abstract JodaDateSerializerBase<T> withFormat(JacksonJodaDateFormat format, int shapeOverride)

References Deprecated

JodaDateSerializerBase is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Since
2.9
writeWithZoneIdback to summary
protected boolean writeWithZoneId(SerializerProvider provider)
Since
2.8