java.lang.Object
tools.jackson.databind.ValueSerializer<T>
tools.jackson.databind.ser.std.StdSerializer<T>
tools.jackson.databind.ser.std.StdScalarSerializer<Blob>
tools.jackson.databind.ext.sql.JavaSqlBlobSerializer
- All Implemented Interfaces:
JsonFormatVisitable
Serializer implementation for
Blob to write as binary
(for JSON and other formats Base64-encoded String, for binary formats as
true binary).- See Also:
-
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 void_writeValue(Blob value, JsonGenerator gen, SerializationContext ctxt) voidacceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) Default implementation specifies no format.booleanisEmpty(SerializationContext provider, Blob value) Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).voidserialize(Blob value, JsonGenerator gen, SerializationContext ctxt) Method that can be called to ask implementation to serialize values of type this serializer handles.voidserializeWithType(Blob value, JsonGenerator gen, SerializationContext ctxt, TypeSerializer typeSer) Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix.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, wrapAndThrowMethods inherited from class tools.jackson.databind.ValueSerializer
createContextual, getDelegatee, isUnwrappingSerializer, properties, replaceDelegatee, resolve, unwrappingSerializer, usesObjectId, withFilterId, withFormatOverrides, withIgnoredProperties
-
Field Details
-
instance
-
-
Constructor Details
-
JavaSqlBlobSerializer
public JavaSqlBlobSerializer()
-
-
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<Blob>
-
serialize
public void serialize(Blob value, JsonGenerator gen, SerializationContext ctxt) 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<Blob>- Parameters:
value- Value to serialize; can not be null.gen- Generator used to output resulting Json contentctxt- Context that can be used to get serializers for serializing Objects value contains, if any.- Throws:
JacksonException
-
serializeWithType
public void serializeWithType(Blob value, JsonGenerator gen, SerializationContext ctxt, TypeSerializer typeSer) throws JacksonException Description copied from class:StdScalarSerializerDefault implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix. This should work for most cases; some sub-classes may want to change this behavior.- Overrides:
serializeWithTypein classStdScalarSerializer<Blob>- Parameters:
value- Value to serialize; can not be null.gen- Generator used to output resulting Json contentctxt- Context that can be used to get serializers for serializing Objects value contains, if any.typeSer- Type serializer to use for including type information- Throws:
JacksonException
-
_writeValue
protected void _writeValue(Blob value, JsonGenerator gen, SerializationContext ctxt) throws JacksonException - Throws:
JacksonException
-
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<Blob>typeHint- Type of element (entity like property) being visited
-