Module tools.jackson.databind
Package tools.jackson.databind.ser.jdk
Class NumberSerializers.IntLikeSerializer
java.lang.Object
tools.jackson.databind.ValueSerializer<T>
tools.jackson.databind.ser.std.StdSerializer<T>
tools.jackson.databind.ser.std.StdScalarSerializer<T>
tools.jackson.databind.ser.jdk.NumberSerializers.Base<Object>
tools.jackson.databind.ser.jdk.NumberSerializers.IntLikeSerializer
- All Implemented Interfaces:
JsonFormatVisitable
- Enclosing class:
- NumberSerializers
Similar to
NumberSerializers.IntegerSerializer, but will not cast to Integer:
instead, cast is to Number, and conversion is by
calling Number.intValue().-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.ValueSerializer
ValueSerializer.None -
Field Summary
Fields inherited from class tools.jackson.databind.ser.jdk.NumberSerializers.Base
_isInt, _numberType, _schemaTypeFields inherited from class tools.jackson.databind.ser.std.StdSerializer
_handledType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidserialize(Object value, JsonGenerator gen, SerializationContext provider) Method that can be called to ask implementation to serialize values of type this serializer handles.Methods inherited from class tools.jackson.databind.ser.jdk.NumberSerializers.Base
acceptJsonFormatVisitor, createContextualMethods inherited from class tools.jackson.databind.ser.std.StdScalarSerializer
serializeWithTypeMethods inherited from class tools.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, _wrapIOFailure, acceptJsonFormatVisitorForBinary, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrowMethods inherited from class tools.jackson.databind.ValueSerializer
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, resolve, unwrappingSerializer, usesObjectId, withFilterId, withFormatOverrides, withIgnoredProperties
-
Constructor Details
-
IntLikeSerializer
public IntLikeSerializer()
-
-
Method Details
-
serialize
public void serialize(Object value, JsonGenerator gen, SerializationContext provider) throws JacksonException Description copied from class:ValueSerializerMethod that can be called to ask implementation to serialize values of type this serializer handles.- Specified by:
serializein classStdSerializer<Object>- Parameters:
value- Value to serialize; can not be null.gen- Generator used to output resulting Json contentprovider- Context that can be used to get serializers for serializing Objects value contains, if any.- Throws:
JacksonException
-