Module tools.jackson.databind
Package tools.jackson.databind.ser.jdk
Class NumberToStringWithRadixSerializer
java.lang.Object
tools.jackson.databind.ValueSerializer<T>
tools.jackson.databind.ser.std.StdSerializer<Object>
tools.jackson.databind.ser.std.ToStringSerializerBase
tools.jackson.databind.ser.jdk.NumberToStringWithRadixSerializer
- All Implemented Interfaces:
JsonFormatVisitable
Serializer used to convert numbers into a representation for a specified radix (base) and serialize
the representation as string.
- Since:
- 3.1
-
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.std.StdSerializer
_handledType -
Constructor Summary
ConstructorsConstructorDescriptionNumberToStringWithRadixSerializer(int radix) NumberToStringWithRadixSerializer(Class<?> handledType, int radix) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty(SerializationContext ctxt, Object value) Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).voidserialize(Object value, tools.jackson.core.JsonGenerator gen, SerializationContext provider) Method that can be called to ask implementation to serialize values of type this serializer handles.valueToString(Object value) Methods inherited from class tools.jackson.databind.ser.std.ToStringSerializerBase
acceptJsonFormatVisitor, 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
createContextual, getDelegatee, isUnwrappingSerializer, properties, replaceDelegatee, resolve, unwrappingSerializer, usesObjectId, withFilterId, withFormatOverrides, withIgnoredProperties
-
Constructor Details
-
NumberToStringWithRadixSerializer
public NumberToStringWithRadixSerializer(int radix) -
NumberToStringWithRadixSerializer
-
-
Method Details
-
isEmpty
Description copied from class:ValueSerializerMethod 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.
- Overrides:
isEmptyin classToStringSerializerBase
-
serialize
public void serialize(Object value, tools.jackson.core.JsonGenerator gen, SerializationContext provider) throws tools.jackson.core.JacksonException Description copied from class:ValueSerializerMethod that can be called to ask implementation to serialize values of type this serializer handles.- Overrides:
serializein classToStringSerializerBase- 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:
tools.jackson.core.JacksonException
-
valueToString
- Specified by:
valueToStringin classToStringSerializerBase
-