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
_numberType, _schemaType
_handledType
Constructor and Description |
---|
NumberSerializers.IntLikeSerializer() |
Modifier and Type | Method and Description |
---|---|
void |
serialize(Number value,
JsonGenerator jgen,
SerializerProvider provider)
Method that can be called to ask implementation to serialize
values of type this serializer handles.
|
acceptJsonFormatVisitor, createContextual, getSchema
serializeWithType
createObjectNode, createSchemaNode, createSchemaNode, findConvertingContentSerializer, findPropertyFilter, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow
getDelegatee, isEmpty, isUnwrappingSerializer, replaceDelegatee, unwrappingSerializer, usesObjectId
public void serialize(Number value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException
JsonSerializer
serialize
in class StdSerializer<Number>
value
- Value to serialize; can not be null.jgen
- Generator used to output resulting Json contentprovider
- Provider that can be used to get serializers for
serializing Objects value contains, if any.IOException
JsonGenerationException
Copyright © 2014 FasterXML. All Rights Reserved.