Class OptionalSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
com.fasterxml.jackson.datatype.jdk8.OptionalSerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
,com.fasterxml.jackson.databind.jsonschema.SchemaAware
,com.fasterxml.jackson.databind.ser.ContextualSerializer
,Serializable
public class OptionalSerializer
extends com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
-
Field Summary
Fields inherited from class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer
_dynamicSerializers, _property, _referredType, _suppressableValue, _suppressNulls, _unwrapper, _valueSerializer, _valueTypeSerializer, MARKER_FOR_EMPTY
Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
OptionalSerializer
(com.fasterxml.jackson.databind.type.ReferenceType fullType, boolean staticTyping, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<Object> ser) protected
OptionalSerializer
(OptionalSerializer base, com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> valueSer, com.fasterxml.jackson.databind.util.NameTransformer unwrapper, Object suppressableValue, boolean suppressNulls) -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
_getReferenced
(Optional<?> value) protected Object
_getReferencedIfPresent
(Optional<?> value) protected boolean
_isValuePresent
(Optional<?> value) com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
withContentInclusion
(Object suppressableValue, boolean suppressNulls) protected com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
withResolved
(com.fasterxml.jackson.databind.BeanProperty prop, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> valueSer, com.fasterxml.jackson.databind.util.NameTransformer unwrapper) Methods inherited from class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer
_useStatic, acceptJsonFormatVisitor, createContextual, getReferredType, isEmpty, isUnwrappingSerializer, serialize, serializeWithType, unwrappingSerializer
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, properties, replaceDelegatee, usesObjectId, withFilterId
-
Constructor Details
-
OptionalSerializer
protected OptionalSerializer(com.fasterxml.jackson.databind.type.ReferenceType fullType, boolean staticTyping, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<Object> ser) -
OptionalSerializer
protected OptionalSerializer(OptionalSerializer base, com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> valueSer, com.fasterxml.jackson.databind.util.NameTransformer unwrapper, Object suppressableValue, boolean suppressNulls)
-
-
Method Details
-
withResolved
protected com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>> withResolved(com.fasterxml.jackson.databind.BeanProperty prop, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> valueSer, com.fasterxml.jackson.databind.util.NameTransformer unwrapper) - Specified by:
withResolved
in classcom.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
-
withContentInclusion
public com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>> withContentInclusion(Object suppressableValue, boolean suppressNulls) - Specified by:
withContentInclusion
in classcom.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
-
_isValuePresent
- Specified by:
_isValuePresent
in classcom.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
-
_getReferenced
- Specified by:
_getReferenced
in classcom.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
-
_getReferencedIfPresent
- Specified by:
_getReferencedIfPresent
in classcom.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<Optional<?>>
-