public static final class NumberSerializers.IntLikeSerializer extends NumberSerializers.Base<Number>
NumberSerializers.IntegerSerializer, but will not cast to Integer:
instead, cast is to Number, and conversion is
by calling Number.intValue().JsonSerializer.None_isInt, _numberType, _schemaType, EMPTY_INTEGER_handledType| Constructor and Description |
|---|
IntLikeSerializer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty(SerializerProvider prov,
Number value)
Method called to check whether given serializable value is
considered "empty" value (for purposes of suppressing serialization
of empty values).
|
void |
serialize(Number value,
com.fasterxml.jackson.core.JsonGenerator gen,
SerializerProvider provider)
Method that can be called to ask implementation to serialize
values of type this serializer handles.
|
acceptJsonFormatVisitor, createContextual, getSchemaserializeWithTypecreateObjectNode, createSchemaNode, createSchemaNode, findConvertingContentSerializer, findPropertyFilter, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrowgetDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterIdpublic boolean isEmpty(SerializerProvider prov, Number value)
JsonSerializerDefault implementation will consider only null values to be empty.
NOTE: replaces JsonSerializer.isEmpty(Object), deprecated in 2.5
isEmpty in class JsonSerializer<Number>public void serialize(Number value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider) throws IOException
JsonSerializerserialize in class StdSerializer<Number>value - Value to serialize; can not be null.gen - Generator used to output resulting Json contentprovider - Provider that can be used to get serializers for
serializing Objects value contains, if any.IOExceptionCopyright © 2014–2015 FasterXML. All rights reserved.