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).
|
void |
serialize(UUID value,
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, findFormatFeature, findFormatOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId
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, 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 © 2008–2016 FasterXML. All rights reserved.