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(UUID value)
Method called to check whether given serializable value is
considered "empty" value (for purposes of suppressing serialization
of empty values).
|
void |
serialize(UUID value,
JsonGenerator jgen,
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
public boolean isEmpty(UUID value)
JsonSerializer
Default implementation will consider only null values to be empty.
isEmpty
in class JsonSerializer<UUID>
public void serialize(UUID value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException
JsonSerializer
serialize
in class StdSerializer<UUID>
value
- Value to serialize; can not be null.jgen
- Generator used to output resulting Json contentprovider
- Provider that can be used to get serializers for
serializing Objects value contains, if any.IOException
JsonGenerationException
Copyright © 2014 FasterXML. All Rights Reserved.