public class UUIDSerializer extends StdScalarSerializer<java.util.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
Constructor and Description |
---|
UUIDSerializer() |
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty(SerializerProvider prov,
java.util.UUID value)
Method called to check whether given serializable value is
considered "empty" value (for purposes of suppressing serialization
of empty values).
|
void |
serialize(java.util.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
getSchema, handledType, wrapAndThrow, wrapAndThrow
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId
public boolean isEmpty(SerializerProvider prov, java.util.UUID value)
JsonSerializer
Default implementation will consider only null values to be empty.
NOTE: replaces JsonSerializer.isEmpty(Object)
, which was deprecated in 2.5
isEmpty
in class JsonSerializer<java.util.UUID>
public void serialize(java.util.UUID value, JsonGenerator gen, SerializerProvider provider) throws java.io.IOException
JsonSerializer
serialize
in class StdSerializer<java.util.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.java.io.IOException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"