public class UUIDSerializer extends StdScalarSerializer<UUID>
JsonSerializer to output UUIDs.
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, serializeWithTypecreateObjectNode, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrowgetDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterIdpublic boolean isEmpty(SerializerProvider prov, UUID value)
JsonSerializerDefault implementation will consider only null values to be empty.
NOTE: replaces JsonSerializer.isEmpty(Object), which was deprecated in 2.5
isEmpty in class JsonSerializer<UUID>public void serialize(UUID value, JsonGenerator gen, SerializerProvider provider) throws IOException
JsonSerializerserialize 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.IOExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.