Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.ser.std

public Class SqlDateSerializer

extends DateTimeSerializerBase<Date>
Class Inheritance
Annotations
@JacksonStdImpl
@SuppressWarnings:serial
Imports
java.io.IOException, java.text.DateFormat, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.annotation.JacksonStdImpl

Deprecated

as a consequence of DateTimeSerializerBase being deprecated. See corresponding docs for further information.

Compared to regular java.util.Date serialization, we do use String representation here. Why? Basically to truncate of time part, since that should not be used by plain SQL date.

Field Summary

Inherited from com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase:
_customFormat_reusedCustomFormat_useTimestamp

Constructor Summary

AccessConstructor and Description
public
protected
SqlDateSerializer(Boolean useTimestamp, DateFormat customFormat)

Method Summary

Modifier and TypeMethod and Description
protected long
public void
serialize(Date
Value to serialize; can not be null.
value
,
JsonGenerator
Generator used to output resulting Json content
g
,
SerializerProvider
Provider that can be used to get serializers for serializing Objects value contains, if any.
provider
)

Implements abstract com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.
public SqlDateSerializer
withFormat(Boolean timestamp, DateFormat customFormat)

Implements abstract com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase.withFormat.

Deprecated as a consequence of SqlDateSerializer being deprecated.
Inherited from com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase:
_acceptJsonFormatVisitor_asTimestamp_serializeAsStringacceptJsonFormatVisitorcreateContextualgetSchemaisEmpty

Constructor Detail

SqlDateSerializerback to summary
public SqlDateSerializer()
SqlDateSerializerback to summary
protected SqlDateSerializer(Boolean useTimestamp, DateFormat customFormat)

Method Detail

_timestampback to summary
protected long _timestamp(Date value)

Implements abstract com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase._timestamp.

Annotations
@Override
serializeback to summary
public void serialize(Date value, JsonGenerator g, SerializerProvider provider) throws IOException

Implements abstract com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase.serialize.

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

Method that can be called to ask implementation to serialize values of type this serializer handles.

Parameters
value:Date

Value to serialize; can not be null.

g:JsonGenerator

Generator used to output resulting Json content

provider:SerializerProvider

Provider that can be used to get serializers for serializing Objects value contains, if any.

Annotations
@Override
withFormatback to summary
public SqlDateSerializer withFormat(Boolean timestamp, DateFormat customFormat)

Implements abstract com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase.withFormat.

Deprecated

as a consequence of SqlDateSerializer being deprecated. See corresponding docs for further information.

Annotations
@Override