Module tools.jackson.databind
Package tools.jackson.databind.ser.jdk
Class JDKKeySerializers.Dynamic
java.lang.Object
tools.jackson.databind.ValueSerializer<T>
tools.jackson.databind.ser.std.StdSerializer<Object>
tools.jackson.databind.ser.jdk.JDKKeySerializers.Dynamic
- All Implemented Interfaces:
JsonFormatVisitable
- Enclosing class:
- JDKKeySerializers
Key serializer used when key type is not known statically, and actual key
serializer needs to be dynamically located.
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.ValueSerializer
ValueSerializer.None
-
Field Summary
FieldsFields inherited from class tools.jackson.databind.ser.std.StdSerializer
_handledType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ValueSerializer<Object>
_findAndAddDynamic
(PropertySerializerMap map, Class<?> type, SerializationContext provider) void
acceptJsonFormatVisitor
(JsonFormatVisitorWrapper visitor, JavaType typeHint) Default implementation specifies no format.void
serialize
(Object value, JsonGenerator g, 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.std.StdSerializer
_neitherNull, _nonEmpty, _wrapIOFailure, acceptJsonFormatVisitorForBinary, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
Methods inherited from class tools.jackson.databind.ValueSerializer
createContextual, getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, resolve, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withFormatOverrides, withIgnoredProperties
-
Field Details
-
_dynamicSerializers
-
-
Constructor Details
-
Dynamic
public Dynamic()
-
-
Method Details
-
serialize
public void serialize(Object value, JsonGenerator g, SerializationContext provider) throws JacksonException Description copied from class:ValueSerializer
Method that can be called to ask implementation to serialize values of type this serializer handles.- Specified by:
serialize
in classStdSerializer<Object>
- Parameters:
value
- Value to serialize; can not be null.g
- Generator used to output resulting Json contentprovider
- Context that can be used to get serializers for serializing Objects value contains, if any.- Throws:
JacksonException
-
acceptJsonFormatVisitor
Description copied from class:StdSerializer
Default implementation specifies no format. This behavior is usually overriden by custom serializers.- Specified by:
acceptJsonFormatVisitor
in interfaceJsonFormatVisitable
- Overrides:
acceptJsonFormatVisitor
in classStdSerializer<Object>
typeHint
- Type of element (entity like property) being visited
-
_findAndAddDynamic
protected ValueSerializer<Object> _findAndAddDynamic(PropertySerializerMap map, Class<?> type, SerializationContext provider)
-