public class DateSerializer extends DateTimeSerializerBase<Date>
JsonSerializer.None| Modifier and Type | Field and Description |
|---|---|
static DateSerializer |
instance
Default instance that is used when no contextual configuration
is needed.
|
| Constructor and Description |
|---|
DateSerializer() |
DateSerializer(Boolean useTimestamp,
DateFormat customFormat) |
| Modifier and Type | Method and Description |
|---|---|
void |
serialize(Date value,
JsonGenerator g,
SerializerProvider provider)
Method that can be called to ask implementation to serialize
values of type this serializer handles.
|
DateSerializer |
withFormat(Boolean timestamp,
DateFormat customFormat) |
acceptJsonFormatVisitor, createContextual, getSchema, isEmptyserializeWithTypegetSchema, handledType, wrapAndThrow, wrapAndThrowgetDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterIdpublic static final DateSerializer instance
public DateSerializer()
public DateSerializer(Boolean useTimestamp, DateFormat customFormat)
public DateSerializer withFormat(Boolean timestamp, DateFormat customFormat)
withFormat in class DateTimeSerializerBase<Date>public void serialize(Date value, JsonGenerator g, SerializerProvider provider) throws IOException
JsonSerializerserialize in class DateTimeSerializerBase<Date>value - Value to serialize; can not be null.g - Generator used to output resulting Json contentprovider - Provider that can be used to get serializers for
serializing Objects value contains, if any.IOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved