public final class IiifIndexedListSerializer extends com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase<List<?>>
This is a custom serializer for List<Object> that has some special cases required by the IIIF specification, namely that some fields should not be encoded as arrays if they only contain a single element.
Apart from this, the code is identical to IndexedListSerializer and delegates to it where possible.
| Constructor and Description |
|---|
IiifIndexedListSerializer(com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer defaultSerializer,
com.fasterxml.jackson.databind.type.TypeFactory tf) |
| Modifier and Type | Method and Description |
|---|---|
protected com.fasterxml.jackson.databind.ser.ContainerSerializer<?> |
_withValueTypeSerializer(com.fasterxml.jackson.databind.jsontype.TypeSerializer vts) |
boolean |
hasSingleElement(List<?> value) |
void |
serialize(List<?> value,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
protected void |
serializeContents(List<?> value,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase<List<?>> |
withResolved(com.fasterxml.jackson.databind.BeanProperty property,
com.fasterxml.jackson.databind.jsontype.TypeSerializer vts,
com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer,
Boolean unwrapSingle) |
_findAndAddDynamic, _findAndAddDynamic, acceptJsonFormatVisitor, createContextual, getContentSerializer, getContentType, getSchema, serializeWithType, withResolvedhasContentTypeAnnotation, withValueTypeSerializer_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrowpublic IiifIndexedListSerializer(com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer defaultSerializer,
com.fasterxml.jackson.databind.type.TypeFactory tf)
public com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase<List<?>> withResolved(com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer, Boolean unwrapSingle)
withResolved in class com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase<List<?>>public final void serialize(List<?> value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
serialize in class com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase<List<?>>IOExceptionprotected void serializeContents(List<?> value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
serializeContents in class com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase<List<?>>IOExceptionpublic boolean hasSingleElement(List<?> value)
hasSingleElement in class com.fasterxml.jackson.databind.ser.ContainerSerializer<List<?>>protected com.fasterxml.jackson.databind.ser.ContainerSerializer<?> _withValueTypeSerializer(com.fasterxml.jackson.databind.jsontype.TypeSerializer vts)
_withValueTypeSerializer in class com.fasterxml.jackson.databind.ser.ContainerSerializer<List<?>>Copyright © 2018. All rights reserved.