Package org.codehaus.jackson.map.ser.std
Class CollectionSerializer
java.lang.Object
org.codehaus.jackson.map.JsonSerializer<Collection<?>>
org.codehaus.jackson.map.ser.std.SerializerBase<Collection<?>>
org.codehaus.jackson.map.ser.std.ContainerSerializerBase<Collection<?>>
org.codehaus.jackson.map.ser.std.AsArraySerializerBase<Collection<?>>
org.codehaus.jackson.map.ser.std.CollectionSerializer
- All Implemented Interfaces:
ResolvableSerializer,SchemaAware
Fallback serializer for cases where Collection is not known to be
of type for which more specializer serializer exists (such as
index-accessible List).
If so, we will just construct an
Iterator
to iterate over elements.-
Nested Class Summary
Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer
JsonSerializer.None -
Field Summary
Fields inherited from class org.codehaus.jackson.map.ser.std.AsArraySerializerBase
_dynamicSerializers, _elementSerializer, _elementType, _property, _staticTyping, _valueTypeSerializerFields inherited from class org.codehaus.jackson.map.ser.std.SerializerBase
_handledType -
Constructor Summary
ConstructorsConstructorDescriptionCollectionSerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts, BeanProperty property, JsonSerializer<Object> valueSerializer) -
Method Summary
Modifier and TypeMethodDescriptionvoidserializeContents(Collection<?> value, JsonGenerator jgen, SerializerProvider provider) voidserializeContentsUsing(Collection<?> value, JsonGenerator jgen, SerializerProvider provider, JsonSerializer<Object> ser) Methods inherited from class org.codehaus.jackson.map.ser.std.AsArraySerializerBase
_findAndAddDynamic, _findAndAddDynamic, getSchema, resolve, serialize, serializeWithTypeMethods inherited from class org.codehaus.jackson.map.ser.std.ContainerSerializerBase
withValueTypeSerializerMethods inherited from class org.codehaus.jackson.map.ser.std.SerializerBase
createObjectNode, createSchemaNode, createSchemaNode, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow, wrapAndThrow, wrapAndThrowMethods inherited from class org.codehaus.jackson.map.JsonSerializer
isUnwrappingSerializer, unwrappingSerializer
-
Constructor Details
-
CollectionSerializer
public CollectionSerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts, BeanProperty property, JsonSerializer<Object> valueSerializer)
-
-
Method Details
-
_withValueTypeSerializer
- Specified by:
_withValueTypeSerializerin classContainerSerializerBase<Collection<?>>
-
serializeContents
public void serializeContents(Collection<?> value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException - Specified by:
serializeContentsin classAsArraySerializerBase<Collection<?>>- Throws:
IOExceptionJsonGenerationException
-
serializeContentsUsing
public void serializeContentsUsing(Collection<?> value, JsonGenerator jgen, SerializerProvider provider, JsonSerializer<Object> ser) throws IOException, JsonGenerationException - Throws:
IOExceptionJsonGenerationException
-