java.lang.Object
tools.jackson.databind.ValueSerializer<T>
tools.jackson.databind.ser.std.StdSerializer<T>
tools.jackson.databind.ser.std.StdScalarSerializer<OptionalInt>
tools.jackson.databind.ext.jdk8.OptionalIntSerializer
- All Implemented Interfaces:
JsonFormatVisitable
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) Default implementation specifies no format.booleanisEmpty(SerializationContext provider, OptionalInt value) Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).voidserialize(OptionalInt 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.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
createContextual, getDelegatee, isUnwrappingSerializer, properties, replaceDelegatee, resolve, unwrappingSerializer, usesObjectId, withFilterId, withFormatOverrides, withIgnoredProperties
-
Constructor Details
-
OptionalIntSerializer
public OptionalIntSerializer()
-
-
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 classValueSerializer<OptionalInt>
-
acceptJsonFormatVisitor
Description copied from class:StdSerializerDefault implementation specifies no format. This behavior is usually overriden by custom serializers.- Specified by:
acceptJsonFormatVisitorin interfaceJsonFormatVisitable- Overrides:
acceptJsonFormatVisitorin classStdScalarSerializer<OptionalInt>typeHint- Type of element (entity like property) being visited
-
serialize
public void serialize(OptionalInt 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<OptionalInt>- 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
-