public class UUIDSerializer extends StdScalarSerializer<UUID>
JsonSerializer
to output UUID
s.
Beyond optimized access and writing of textual representation (which
is the default handling in most cases), it will alternatively
allow serialization using raw binary output (as 16-byte block)
if underlying data format has efficient means to access that.JsonSerializer.None
_handledType
Constructor and Description |
---|
UUIDSerializer() |
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty(SerializerProvider prov,
UUID value)
Method called to check whether given serializable value is
considered "empty" value (for purposes of suppressing serialization
of empty values).
|
boolean |
isEmpty(UUID value)
Deprecated.
|
void |
serialize(UUID value,
com.fasterxml.jackson.core.JsonGenerator gen,
SerializerProvider provider)
Method that can be called to ask implementation to serialize
values of type this serializer handles.
|
acceptJsonFormatVisitor, getSchema, serializeWithType
createObjectNode, createSchemaNode, createSchemaNode, findConvertingContentSerializer, findPropertyFilter, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow
getDelegatee, isUnwrappingSerializer, replaceDelegatee, unwrappingSerializer, usesObjectId
@Deprecated public boolean isEmpty(UUID value)
JsonSerializer
Default implementation will consider only null values to be empty.
isEmpty
in class JsonSerializer<UUID>
public boolean isEmpty(SerializerProvider prov, UUID value)
JsonSerializer
Default implementation will consider only null values to be empty.
NOTE: replaces JsonSerializer.isEmpty(Object)
, deprecated in 2.5
isEmpty
in class JsonSerializer<UUID>
public void serialize(UUID value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider) throws IOException
JsonSerializer
serialize
in class StdSerializer<UUID>
value
- Value to serialize; can not be null.gen
- Generator used to output resulting Json contentprovider
- Provider that can be used to get serializers for
serializing Objects value contains, if any.IOException
Copyright © 2014-2015 FasterXML. All Rights Reserved.