Deprecated
as a consequence of StdScalarSerializer being deprecated. See corresponding docs for further information.
| 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
Type of element (entity like property) being visited typeHint)Overrides com. Implements com. |
| public JsonSerializer | createContextual(SerializerProvider
Serializer provider to use for accessing config, other serializers serializers, 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. |
| public JsonNode | getSchema(SerializerProvider
The serializer provider. serializers, Type A hint about the type. typeHint)Overrides com. Implements com.
Deprecated
Since 2.15
Default implementation simply claims type is "string"; usually
overriden by custom serializers.
|
| public boolean | isEmpty(SerializerProvider serializers, T value)
Overrides com. |
| public abstract void | serialize(T
Value to serialize; can not be null. value, JsonGenerator Generator used to output resulting Json content gen, SerializerProvider Provider that can be used to get serializers for
serializing Objects value contains, if any. serializers)Implements abstract com. |
| public abstract DateTimeSerializerBase | withFormat(Boolean timestamp, DateFormat customFormat)
Deprecated
as a consequence of
DateTimeSerializerBase being deprecated.
|
| _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) throws JsonMappingException | |
| _asTimestamp | back to summary |
|---|---|
| protected boolean _asTimestamp(SerializerProvider serializers) | |
| _serializeAsString | back to summary |
|---|---|
protected void _serializeAsString(Date value, JsonGenerator g, SerializerProvider provider) throws IOException
| |
| _timestamp | back to summary |
|---|---|
| protected abstract long _timestamp(T value) | |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException Overrides com. Implements com. Doc from com. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| createContextual | back to summary |
|---|---|
| public JsonSerializer Implements com. Doc from com. 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.
| |
| getSchema | back to summary |
|---|---|
| public JsonNode getSchema(SerializerProvider serializers, Type typeHint) Overrides com. Implements com. Doc from com. Deprecated Since 2.15 Default implementation simply claims type is "string"; usually overriden by custom serializers.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty(SerializerProvider serializers, T value) Overrides com. Doc from com. 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
| |
| serialize | back to summary |
|---|---|
| public abstract void serialize(T value, JsonGenerator gen, SerializerProvider serializers) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| withFormat | back to summary |
|---|---|
| public abstract DateTimeSerializerBase Deprecated as a consequence of | |