org.springframework.hateoas.hal
Class Jackson1HalModule.OptionalListSerializer
java.lang.Object
org.codehaus.jackson.map.JsonSerializer<T>
org.codehaus.jackson.map.ser.std.SerializerBase<T>
org.codehaus.jackson.map.ser.std.ContainerSerializerBase<Object>
org.springframework.hateoas.hal.Jackson1HalModule.OptionalListSerializer
- All Implemented Interfaces:
- org.codehaus.jackson.schema.SchemaAware
- Enclosing class:
- Jackson1HalModule
public static class Jackson1HalModule.OptionalListSerializer
- extends org.codehaus.jackson.map.ser.std.ContainerSerializerBase<Object>
Custom JsonSerializer to render Objects in HAL compatible JSON. Renders the Object as immediate object if
we have a single one or as array if we have multiple ones.
- 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)
|
void |
serialize(Object 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.OptionalListSerializer
public Jackson1HalModule.OptionalListSerializer()
Jackson1HalModule.OptionalListSerializer
public Jackson1HalModule.OptionalListSerializer(org.codehaus.jackson.map.BeanProperty property)
_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<Object>
serialize
public void serialize(Object 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<Object>
- Throws:
IOException
org.codehaus.jackson.JsonGenerationException
Copyright © 2012-2014 Pivotal, Inc.. All Rights Reserved.