java.lang.Integer ).
| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | NumberSerializers.Base<T>
Deprecated
as a consequence of Shared base class for actual primitive/wrapper number serializers.
StdScalarSerializer being deprecated.
|
| public static class | NumberSerializers.DoubleSerializer
Deprecated
as a consequence of This is the special serializer for regular NumberSerializers.Base being deprecated.
java.s (and
primitive doubles)
Since this is one of "native" types, no type information is ever included
on serialization (unlike for most scalar types other than |
| public static class | NumberSerializers.FloatSerializer
Deprecated
as a consequence of
NumberSerializers.Base being deprecated.
|
| public static class | NumberSerializers.IntegerSerializer
Deprecated
as a consequence of This is the special serializer for regular NumberSerializers.Base being deprecated.
java.s
(and primitive ints)
Since this is one of "natural" types, no type information is ever included
on serialization (unlike for most scalar types, except for |
| public static class | NumberSerializers.IntLikeSerializer
Deprecated
as a consequence of Similar to NumberSerializers.Base being deprecated.
IntegerSerializer, but will not cast to Integer:
instead, cast is to java., and conversion is by
calling java..
|
| public static class | NumberSerializers.LongSerializer
Deprecated
as a consequence of
NumberSerializers.Base being deprecated.
|
| public static class | NumberSerializers.ShortSerializer
Deprecated
as a consequence of
NumberSerializers.Base being deprecated.
|
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static void |
| NumberSerializers | back to summary |
|---|---|
| protected NumberSerializers() | |
| addAll | back to summary |
|---|---|
| public static void addAll(Map<String, JsonSerializer<?>> allDeserializers) | |
Deprecated
as a consequence of StdScalarSerializer being deprecated. See corresponding docs for further information.
Note
public since 2.10: previously had protected access.
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | |
| protected final JsonParser. | |
| protected final String |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| 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 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. |
| public JsonNode | getSchema(SerializerProvider
The serializer provider. provider, 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.
|
| _isInt | back to summary |
|---|---|
| protected final boolean _isInt | |
| _numberType | back to summary |
|---|---|
| protected final JsonParser. | |
| _schemaType | back to summary |
|---|---|
| protected final String _schemaType | |
| Base | back to summary |
|---|---|
| protected Base(Class<?> cls, JsonParser. | |
| 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 provider, 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.
| |
Deprecated
as a consequence of NumberSerializers.Base being deprecated. See corresponding docs for further information.
java.lang.Double s (and
primitive doubles)
Since this is one of "native" types, no type information is ever included
on serialization (unlike for most scalar types other than long).
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public void | serialize(Object
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. provider)Implements abstract com. |
| public void | serializeWithType(Object
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, TypeSerializer Type serializer to use for including type information typeSer)Overrides com. |
| DoubleSerializer | back to summary |
|---|---|
| public DoubleSerializer(Class<?> cls) | |
| notFinite | back to summary |
|---|---|
| public static boolean notFinite(double value)
Deprecated
| |
| serialize | back to summary |
|---|---|
| public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(Object value, JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) throws IOException Overrides com. Doc from com. Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix. This should work for most cases; some sub-classes may want to change this behavior.
| |
Deprecated
as a consequence of NumberSerializers.Base being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final NumberSerializers. | instance
Deprecated
as a consequence of
NumberSerializers.FloatSerializer being deprecated.
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | serialize(Object
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. provider)Implements abstract com. |
| instance | back to summary |
|---|---|
| pack-priv static final NumberSerializers. Deprecated as a consequence of | |
| FloatSerializer | back to summary |
|---|---|
| public FloatSerializer() | |
| serialize | back to summary |
|---|---|
| public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
Deprecated
as a consequence of NumberSerializers.Base being deprecated. See corresponding docs for further information.
java.lang.Integer s
(and primitive ints)
Since this is one of "natural" types, no type information is ever included
on serialization (unlike for most scalar types, except for double).
Note
as of 2.6, generic signature changed to Object, to avoid generation of bridge methods.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | serialize(Object
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. provider)Implements abstract com. |
| public void | serializeWithType(Object
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. provider, TypeSerializer Type serializer to use for including type information typeSer)Overrides com. |
| IntegerSerializer | back to summary |
|---|---|
| public IntegerSerializer(Class<?> type) | |
| serialize | back to summary |
|---|---|
| public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(Object value, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) throws IOException Overrides com. Doc from com. Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix. This should work for most cases; some sub-classes may want to change this behavior.
| |
Deprecated
as a consequence of NumberSerializers.Base being deprecated. See corresponding docs for further information.
IntegerSerializer, but will not cast to Integer:
instead, cast is to java.lang.Number , and conversion is by
calling java.lang.Number#intValue .
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final NumberSerializers. | instance
Deprecated
as a consequence of
NumberSerializers.IntLikeSerializer being deprecated.
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | serialize(Object
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. provider)Implements abstract com. |
| instance | back to summary |
|---|---|
| pack-priv static final NumberSerializers. Deprecated as a consequence of | |
| IntLikeSerializer | back to summary |
|---|---|
| public IntLikeSerializer() | |
| serialize | back to summary |
|---|---|
| public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
Deprecated
as a consequence of NumberSerializers.Base being deprecated. See corresponding docs for further information.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | serialize(Object
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. provider)Implements abstract com. |
| LongSerializer | back to summary |
|---|---|
| public LongSerializer(Class<?> cls) | |
| serialize | back to summary |
|---|---|
| public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
Deprecated
as a consequence of NumberSerializers.Base being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final NumberSerializers. | instance
Deprecated
as a consequence of
NumberSerializers.ShortSerializer being deprecated.
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | serialize(Object
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. provider)Implements abstract com. |
| instance | back to summary |
|---|---|
| pack-priv static final NumberSerializers. Deprecated as a consequence of | |
| ShortSerializer | back to summary |
|---|---|
| public ShortSerializer() | |
| serialize | back to summary |
|---|---|
| public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |