Deprecated
as a consequence of AsArraySerializerBase being deprecated. See corresponding docs for further information.
java.util.Iterator
to iterate over elements.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | CollectionSerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> valueSerializer)
|
| public | CollectionSerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts, BeanProperty property, JsonSerializer<Object> valueSerializer)
Deprecated
since 2.6
|
| public | CollectionSerializer(CollectionSerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSerializer, Boolean unwrapSingle)
Deprecated
as a consequence of
CollectionSerializer being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public ContainerSerializer | _withValueTypeSerializer(TypeSerializer vts)
Implements abstract com.
Deprecated
as a consequence of
Method that needs to be implemented to allow construction of a new
serializer object with given ContainerSerializer being deprecated.
TypeSerializer, used when
addition type information is to be embedded.
|
| public boolean | hasSingleElement(Collection<?> value)
Implements abstract com. |
| public boolean | isEmpty(SerializerProvider prov, Collection<?> value)
Overrides com. |
| public final void | serialize(Collection<?>
Value to serialize; can not be null. value, JsonGenerator Generator used to output resulting Json content g, SerializerProvider Provider that can be used to get serializers for
serializing Objects value contains, if any. provider)Overrides com. |
| public void | serializeContents(Collection<?> value, JsonGenerator g, SerializerProvider provider)
Implements abstract com. |
| public void | serializeContentsUsing(Collection<?> value, JsonGenerator g, SerializerProvider provider, JsonSerializer<Object> ser)
|
| public CollectionSerializer | withResolved(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle)
Implements abstract com.
Deprecated
as a consequence of
CollectionSerializer being deprecated.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| CollectionSerializer | back to summary |
|---|---|
public CollectionSerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> valueSerializer)
| |
| CollectionSerializer | back to summary |
|---|---|
| public CollectionSerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts, BeanProperty property, JsonSerializer<Object> valueSerializer)
Deprecated since 2.6
| |
| CollectionSerializer | back to summary |
|---|---|
| public CollectionSerializer(CollectionSerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSerializer, Boolean unwrapSingle)
Deprecated as a consequence of | |
| _withValueTypeSerializer | back to summary |
|---|---|
| public ContainerSerializer Implements abstract com. Doc from com. Deprecated as a consequence of Method that needs to be implemented to allow construction of a new
serializer object with given
| |
| hasSingleElement | back to summary |
|---|---|
| public boolean hasSingleElement(Collection<?> value) Implements abstract com. Doc from com. Method called to determine if the given value (of type handled by this serializer) contains exactly one element. Note although it might seem sensible to instead define something like "getElementCount()" method, this would not work well for containers that do not keep track of size (like linked lists may not).
Note, too, that as of now (2.9) this method is only called by serializer
itself; and specifically is not used for non-array/collection types
like
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty(SerializerProvider prov, Collection<?> value) Overrides com. Doc from com. Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values). Default implementation will consider only null values to be empty. Note replaces
| |
| serialize | back to summary |
|---|---|
| public final void serialize(Collection<?> value, JsonGenerator g, SerializerProvider provider) throws IOException Overrides com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeContents | back to summary |
|---|---|
| public void serializeContents(Collection<?> value, JsonGenerator g, SerializerProvider provider) throws IOException Implements abstract com.
| |
| serializeContentsUsing | back to summary |
|---|---|
| public void serializeContentsUsing(Collection<?> value, JsonGenerator g, SerializerProvider provider, JsonSerializer<Object> ser) throws IOException | |
| withResolved | back to summary |
|---|---|
| public CollectionSerializer withResolved(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) Implements abstract com. Deprecated as a consequence of
| |