| Modifier and Type | Field and Description |
|---|---|
| protected final JavaType | |
| protected final BeanProperty | |
| protected final Boolean |
| Access | Constructor and Description |
|---|---|
| protected | PrimitiveIterableSerializer(Class<C> type, JavaType elementType, BeanProperty property, Boolean unwrapSingle)
|
| Modifier and Type | Method and Description |
|---|---|
| protected StdContainerSerializer | _withValueTypeSerializer(TypeSerializer vts)
Implements abstract tools. Method that needs to be implemented to allow construction of a new
serializer object with given |
| public ValueSerializer | getContentSerializer()
Implements abstract tools. Accessor for serializer used for serializing contents (List and array elements, Map values etc) of the container for which this serializer is used, if it is known statically. |
| public JavaType | getContentType()
Implements abstract tools. Accessor for finding declared (static) element type for type this serializer is used for. |
| public final void | serialize(C value, JsonGenerator gen, SerializationContext ctxt)
Implements abstract tools. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| protected abstract void | |
| public void | serializeWithType(C value, JsonGenerator g, SerializationContext ctxt, TypeSerializer typeSer)
Overrides tools. Method that can be called to ask implementation to serialize values of type this serializer handles, using specified type serializer for embedding necessary type information. |
| _elementType | back to summary |
|---|---|
| protected final JavaType _elementType | |
| _property | back to summary |
|---|---|
| protected final BeanProperty _property Hides tools. | |
| _unwrapSingle | back to summary |
|---|---|
| protected final Boolean _unwrapSingle | |
| PrimitiveIterableSerializer | back to summary |
|---|---|
| protected PrimitiveIterableSerializer(Class<C> type, JavaType elementType, BeanProperty property, Boolean unwrapSingle) | |
| _withValueTypeSerializer | back to summary |
|---|---|
| protected StdContainerSerializer Implements abstract tools. Doc from tools. Method that needs to be implemented to allow construction of a new
serializer object with given
| |
| getContentSerializer | back to summary |
|---|---|
| public ValueSerializer Implements abstract tools. Doc from tools. Accessor for serializer used for serializing contents
(List and array elements, Map values etc) of the
container for which this serializer is used, if it is
known statically.
Note that for dynamic types this may return null; if so,
caller has to instead use
| |
| getContentType | back to summary |
|---|---|
| public JavaType getContentType() Implements abstract tools. Doc from tools. Accessor for finding declared (static) element type for type this serializer is used for.
| |
| serialize | back to summary |
|---|---|
| public final void serialize(C value, JsonGenerator gen, SerializationContext ctxt) throws JacksonException Implements abstract tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeContents | back to summary |
|---|---|
| protected abstract void serializeContents(C value, JsonGenerator gen) throws JacksonException | |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(C value, JsonGenerator g, SerializationContext ctxt, TypeSerializer typeSer) throws JacksonException Overrides tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles, using specified type serializer for embedding necessary type information.
Default implementation will throw For simple datatypes written as a single scalar value (JSON String, Number, Boolean), implementation would look like: // note: method to call depends on whether this type is serialized as JSON scalar, object or Array! typeSer.writeTypePrefixForScalar(value, gen); serialize(value, gen, provider); typeSer.writeTypeSuffixForScalar(value, gen);and implementations for type serialized as JSON Arrays or Objects would differ slightly, as START-ARRAY/END-ARRAY and
START-OBJECT/END-OBJECT pairs
need to be properly handled with respect to serializing of contents.
| |