org.springframework.hateoas.hal
Class Jackson1HalModule.HalLinkListSerializer
java.lang.Object
org.codehaus.jackson.map.JsonSerializer<T>
org.codehaus.jackson.map.ser.std.SerializerBase<T>
org.codehaus.jackson.map.ser.std.ContainerSerializerBase<List<Link>>
org.springframework.hateoas.hal.Jackson1HalModule.HalLinkListSerializer
- All Implemented Interfaces:
- org.codehaus.jackson.map.ContextualSerializer<List<Link>>, org.codehaus.jackson.schema.SchemaAware
- Enclosing class:
- Jackson1HalModule
public static class Jackson1HalModule.HalLinkListSerializer
- extends org.codehaus.jackson.map.ser.std.ContainerSerializerBase<List<Link>>
- implements org.codehaus.jackson.map.ContextualSerializer<List<Link>>
Custom JsonSerializer to render Link instances in HAL compatible JSON. Renders the list as a map, where
links are sorted based on their relation.
- Author:
- Alexander Baetz, Oliver Gierke
| Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer |
org.codehaus.jackson.map.JsonSerializer.None |
| Fields inherited from class org.codehaus.jackson.map.ser.std.SerializerBase |
_handledType |
|
Method Summary |
org.codehaus.jackson.map.ser.std.ContainerSerializerBase<?> |
_withValueTypeSerializer(org.codehaus.jackson.map.TypeSerializer vts)
|
org.codehaus.jackson.map.JsonSerializer<List<Link>> |
createContextual(org.codehaus.jackson.map.SerializationConfig config,
org.codehaus.jackson.map.BeanProperty property)
|
void |
serialize(List<Link> value,
org.codehaus.jackson.JsonGenerator jgen,
org.codehaus.jackson.map.SerializerProvider provider)
|
| Methods inherited from class org.codehaus.jackson.map.ser.std.ContainerSerializerBase |
withValueTypeSerializer |
| Methods inherited from class org.codehaus.jackson.map.ser.std.SerializerBase |
createObjectNode, createSchemaNode, createSchemaNode, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow, wrapAndThrow, wrapAndThrow |
| Methods inherited from class org.codehaus.jackson.map.JsonSerializer |
isUnwrappingSerializer, serializeWithType, unwrappingSerializer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Jackson1HalModule.HalLinkListSerializer
public Jackson1HalModule.HalLinkListSerializer()
- Creates a new
Jackson1HalModule.HalLinkListSerializer.
Jackson1HalModule.HalLinkListSerializer
public Jackson1HalModule.HalLinkListSerializer(org.codehaus.jackson.map.BeanProperty property)
serialize
public void serialize(List<Link> value,
org.codehaus.jackson.JsonGenerator jgen,
org.codehaus.jackson.map.SerializerProvider provider)
throws IOException,
org.codehaus.jackson.JsonGenerationException
- Specified by:
serialize in class org.codehaus.jackson.map.ser.std.SerializerBase<List<Link>>
- Throws:
IOException
org.codehaus.jackson.JsonGenerationException
createContextual
public org.codehaus.jackson.map.JsonSerializer<List<Link>> createContextual(org.codehaus.jackson.map.SerializationConfig config,
org.codehaus.jackson.map.BeanProperty property)
throws org.codehaus.jackson.map.JsonMappingException
- Specified by:
createContextual in interface org.codehaus.jackson.map.ContextualSerializer<List<Link>>
- Throws:
org.codehaus.jackson.map.JsonMappingException
_withValueTypeSerializer
public org.codehaus.jackson.map.ser.std.ContainerSerializerBase<?> _withValueTypeSerializer(org.codehaus.jackson.map.TypeSerializer vts)
- Specified by:
_withValueTypeSerializer in class org.codehaus.jackson.map.ser.std.ContainerSerializerBase<List<Link>>
Copyright © 2012-2014 Pivotal, Inc.. All Rights Reserved.