| Modifier and Type | Field and Description |
|---|---|
| protected final DateFormat | _customFormat
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 |
| protected final AtomicReference | _reusedCustomFormat
If |
| protected final Boolean | _useTimestamp
Flag that indicates that serialization must be done as the Java timestamp, regardless of other settings. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected boolean | |
| protected void | |
| protected abstract long | |
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
Overrides tools. Implements tools. Default implementation specifies no format. |
| public ValueSerializer | createContextual(SerializationContext serializers, BeanProperty property)
Overrides tools. Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property (or, for root values, in which case `null` is passed). |
| public boolean | isEmpty(SerializationContext serializers, T value)
Overrides tools. Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values). |
| public abstract void | serialize(T value, JsonGenerator gen, SerializationContext serializers)
Implements abstract tools. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| public abstract DateTimeSerializerBase |
| _customFormat | back to summary |
|---|---|
| protected final DateFormat _customFormat 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 | |
| _reusedCustomFormat | back to summary |
|---|---|
| protected final AtomicReference<DateFormat> _reusedCustomFormat If
| |
| _useTimestamp | back to summary |
|---|---|
| protected final Boolean _useTimestamp Flag that indicates that serialization must be done as the Java timestamp, regardless of other settings. | |
| DateTimeSerializerBase | back to summary |
|---|---|
| protected DateTimeSerializerBase(Class<T> type, Boolean useTimestamp, DateFormat customFormat) | |
| _acceptJsonFormatVisitor | back to summary |
|---|---|
| protected void _acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint, boolean asNumber) | |
| _asTimestamp | back to summary |
|---|---|
| protected boolean _asTimestamp(SerializationContext serializers) | |
| _serializeAsString | back to summary |
|---|---|
| protected void _serializeAsString(Date value, JsonGenerator g, SerializationContext provider) throws JacksonException | |
| _timestamp | back to summary |
|---|---|
| protected abstract long _timestamp(T value) | |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) Overrides tools. Implements tools. Doc from tools. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| createContextual | back to summary |
|---|---|
| public ValueSerializer Overrides tools. Doc from tools. Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property (or, for root values, in which case `null` is passed). 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. Note that method is only called once per POJO property, and for the first usage as root value serializer; it is not called for every serialization, as doing that would have significant performance impact; most serializers cache contextual instances for future use.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty(SerializationContext serializers, T value) Overrides tools. Doc from tools. 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.
| |
| serialize | back to summary |
|---|---|
| public abstract void serialize(T value, JsonGenerator gen, SerializationContext serializers) throws JacksonException Implements abstract tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| withFormat | back to summary |
|---|---|
| public abstract DateTimeSerializerBase | |