public static class Jackson2HalModule.OptionalListJackson2Serializer extends com.fasterxml.jackson.databind.ser.ContainerSerializer<Object> implements com.fasterxml.jackson.databind.ser.ContextualSerializer
JsonSerializer
to render Link instances in HAL compatible JSON. Renders the Link
as
immediate object if we have a single one or as array if we have multiple ones.Constructor and Description |
---|
OptionalListJackson2Serializer() |
OptionalListJackson2Serializer(com.fasterxml.jackson.databind.BeanProperty property)
Creates a new
Jackson2HalModule.OptionalListJackson2Serializer using the given BeanProperty . |
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.ser.ContainerSerializer<?> |
_withValueTypeSerializer(com.fasterxml.jackson.databind.jsontype.TypeSerializer vts) |
com.fasterxml.jackson.databind.JsonSerializer<?> |
createContextual(com.fasterxml.jackson.databind.SerializerProvider provider,
com.fasterxml.jackson.databind.BeanProperty property) |
com.fasterxml.jackson.databind.JsonSerializer<?> |
getContentSerializer() |
com.fasterxml.jackson.databind.JavaType |
getContentType() |
boolean |
hasSingleElement(Object arg0) |
boolean |
isEmpty(com.fasterxml.jackson.databind.SerializerProvider provider,
Object value) |
void |
serialize(Object value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
hasContentTypeAnnotation, isEmpty, withValueTypeSerializer
acceptJsonFormatVisitor, createObjectNode, createSchemaNode, createSchemaNode, findConvertingContentSerializer, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow
public OptionalListJackson2Serializer()
public OptionalListJackson2Serializer(com.fasterxml.jackson.databind.BeanProperty property)
Jackson2HalModule.OptionalListJackson2Serializer
using the given BeanProperty
.property
- public com.fasterxml.jackson.databind.ser.ContainerSerializer<?> _withValueTypeSerializer(com.fasterxml.jackson.databind.jsontype.TypeSerializer vts)
_withValueTypeSerializer
in class com.fasterxml.jackson.databind.ser.ContainerSerializer<Object>
public void serialize(Object value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException, com.fasterxml.jackson.core.JsonGenerationException
serialize
in class com.fasterxml.jackson.databind.ser.std.StdSerializer<Object>
IOException
com.fasterxml.jackson.core.JsonGenerationException
public com.fasterxml.jackson.databind.JsonSerializer<?> getContentSerializer()
getContentSerializer
in class com.fasterxml.jackson.databind.ser.ContainerSerializer<Object>
public com.fasterxml.jackson.databind.JavaType getContentType()
getContentType
in class com.fasterxml.jackson.databind.ser.ContainerSerializer<Object>
public boolean hasSingleElement(Object arg0)
hasSingleElement
in class com.fasterxml.jackson.databind.ser.ContainerSerializer<Object>
public boolean isEmpty(com.fasterxml.jackson.databind.SerializerProvider provider, Object value)
isEmpty
in class com.fasterxml.jackson.databind.JsonSerializer<Object>
public com.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
createContextual
in interface com.fasterxml.jackson.databind.ser.ContextualSerializer
com.fasterxml.jackson.databind.JsonMappingException
Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.