public static class Jackson2HalModule.HalResourcesSerializer extends com.fasterxml.jackson.databind.ser.ContainerSerializer<Collection<?>> implements com.fasterxml.jackson.databind.ser.ContextualSerializer
JsonSerializer
to render Resource
-Lists in HAL compatible JSON. Renders the list as a Map.Constructor and Description |
---|
HalResourcesSerializer(com.fasterxml.jackson.databind.BeanProperty property,
org.springframework.hateoas.hal.Jackson2HalModule.EmbeddedMapper embeddedMapper) |
HalResourcesSerializer(org.springframework.hateoas.hal.Jackson2HalModule.EmbeddedMapper embeddedMapper) |
Modifier and Type | Method and Description |
---|---|
protected 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 prov,
com.fasterxml.jackson.databind.BeanProperty property) |
com.fasterxml.jackson.databind.JsonSerializer<?> |
getContentSerializer() |
com.fasterxml.jackson.databind.JavaType |
getContentType() |
boolean |
hasSingleElement(Collection<?> value) |
boolean |
isEmpty(com.fasterxml.jackson.databind.SerializerProvider provider,
Collection<?> value) |
void |
serialize(Collection<?> value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
hasContentTypeAnnotation, isEmpty, withValueTypeSerializer
acceptJsonFormatVisitor, createObjectNode, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
public HalResourcesSerializer(org.springframework.hateoas.hal.Jackson2HalModule.EmbeddedMapper embeddedMapper)
public HalResourcesSerializer(com.fasterxml.jackson.databind.BeanProperty property, org.springframework.hateoas.hal.Jackson2HalModule.EmbeddedMapper embeddedMapper)
public void serialize(Collection<?> 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<Collection<?>>
IOException
com.fasterxml.jackson.core.JsonGenerationException
public com.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, 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
public com.fasterxml.jackson.databind.JavaType getContentType()
getContentType
in class com.fasterxml.jackson.databind.ser.ContainerSerializer<Collection<?>>
public com.fasterxml.jackson.databind.JsonSerializer<?> getContentSerializer()
getContentSerializer
in class com.fasterxml.jackson.databind.ser.ContainerSerializer<Collection<?>>
public boolean isEmpty(com.fasterxml.jackson.databind.SerializerProvider provider, Collection<?> value)
isEmpty
in class com.fasterxml.jackson.databind.JsonSerializer<Collection<?>>
public boolean hasSingleElement(Collection<?> value)
hasSingleElement
in class com.fasterxml.jackson.databind.ser.ContainerSerializer<Collection<?>>
protected com.fasterxml.jackson.databind.ser.ContainerSerializer<?> _withValueTypeSerializer(com.fasterxml.jackson.databind.jsontype.TypeSerializer vts)
_withValueTypeSerializer
in class com.fasterxml.jackson.databind.ser.ContainerSerializer<Collection<?>>
Copyright © 2012-2016–2018 Pivotal, Inc.. All rights reserved.