public class UnwrappingBeanSerializer extends BeanSerializerBase
JsonSerializer.None
_anyGetterWriter, _filteredProps, _propertyFilterId, _props, NO_PROPS
_handledType
Constructor and Description |
---|
UnwrappingBeanSerializer(BeanSerializerBase src)
Constructor used for creating unwrapping instance of a
standard
BeanSerializer |
Modifier and Type | Method and Description |
---|---|
boolean |
isUnwrappingSerializer()
Accessor for checking whether this serializer is an
"unwrapping" serializer; this is necessary to know since
it may also require caller to suppress writing of the
leading property name.
|
void |
serialize(Object bean,
JsonGenerator jgen,
SerializerProvider provider)
Main serialization method that will delegate actual output to
configured
BeanPropertyWriter instances. |
String |
toString() |
JsonSerializer<Object> |
unwrappingSerializer()
Method that will return serializer instance that produces
"unwrapped" serialization, if applicable for type being
serialized (which is the case for some serializers
that produce JSON Objects as output).
|
findFilter, getSchema, resolve, serializeFields, serializeFieldsFiltered, serializeWithType
createObjectNode, createSchemaNode, createSchemaNode, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow, wrapAndThrow, wrapAndThrow
public UnwrappingBeanSerializer(BeanSerializerBase src)
BeanSerializer
public JsonSerializer<Object> unwrappingSerializer()
JsonSerializer
Default implementation just returns serializer as-is, indicating that no unwrapped variant exists
unwrappingSerializer
in class JsonSerializer<Object>
public boolean isUnwrappingSerializer()
JsonSerializer
isUnwrappingSerializer
in class JsonSerializer<Object>
public final void serialize(Object bean, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException
BeanPropertyWriter
instances.serialize
in class BeanSerializerBase
bean
- Value to serialize; can not be null.jgen
- Generator used to output resulting Json contentprovider
- Provider that can be used to get serializers for
serializing Objects value contains, if any.IOException
JsonGenerationException