Class UnwrappingBeanPropertyWriter
- java.lang.Object
 - 
- com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
 - 
- com.fasterxml.jackson.databind.ser.PropertyWriter
 - 
- com.fasterxml.jackson.databind.ser.BeanPropertyWriter
 - 
- com.fasterxml.jackson.databind.ser.impl.UnwrappingBeanPropertyWriter
 
 
 
 
 
- 
- All Implemented Interfaces:
 BeanProperty,Named,java.io.Serializable
public class UnwrappingBeanPropertyWriter extends BeanPropertyWriter implements java.io.Serializable
Variant ofBeanPropertyWriterwhich will handle unwrapping of JSON Object (including of properties of Object within surrounding JSON object, and not as sub-object).- See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.BeanProperty
BeanProperty.Bogus, BeanProperty.Std 
 - 
 
- 
Field Summary
- 
Fields inherited from class com.fasterxml.jackson.databind.ser.BeanPropertyWriter
MARKER_FOR_EMPTY 
- 
Fields inherited from interface com.fasterxml.jackson.databind.BeanProperty
EMPTY_FORMAT, EMPTY_INCLUDE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description UnwrappingBeanPropertyWriter(BeanPropertyWriter base, NameTransformer unwrapper) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignSerializer(JsonSerializer<java.lang.Object> ser)Method called to assign value serializer for propertyvoiddepositSchemaProperty(JsonObjectFormatVisitor visitor, SerializerProvider provider)Traversal method used for things like JSON Schema generation, or POJO introspection.booleanisUnwrapping()Accessor that will return true if this bean property has to support "unwrapping"; ability to replace POJO structural wrapping with optional name prefix and/or suffix (or in some cases, just removal of wrapper name).UnwrappingBeanPropertyWriterrename(NameTransformer transformer)voidserializeAsField(java.lang.Object bean, JsonGenerator gen, SerializerProvider prov)Method called to access property that this bean stands for, from within given bean, and to serialize it as a JSON Object field using appropriate serializer.- 
Methods inherited from class com.fasterxml.jackson.databind.ser.BeanPropertyWriter
assignNullSerializer, assignTypeSerializer, depositSchemaProperty, fixAccess, get, getAnnotation, getContextAnnotation, getFullName, getGenericPropertyType, getInternalSetting, getMember, getName, getPropertyType, getRawSerializationType, getSerializationType, getSerializedName, getSerializer, getType, getTypeSerializer, getViews, getWrapperName, hasNullSerializer, hasSerializer, removeInternalSetting, serializeAsElement, serializeAsOmittedField, serializeAsPlaceholder, setInternalSetting, setNonTrivialBaseType, toString, unwrappingWriter, willSuppressNulls, wouldConflictWithName 
- 
Methods inherited from class com.fasterxml.jackson.databind.ser.PropertyWriter
findAnnotation 
- 
Methods inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
UnwrappingBeanPropertyWriter
public UnwrappingBeanPropertyWriter(BeanPropertyWriter base, NameTransformer unwrapper)
 
 - 
 
- 
Method Detail
- 
rename
public UnwrappingBeanPropertyWriter rename(NameTransformer transformer)
- Overrides:
 renamein classBeanPropertyWriter
 
- 
isUnwrapping
public boolean isUnwrapping()
Description copied from class:BeanPropertyWriterAccessor that will return true if this bean property has to support "unwrapping"; ability to replace POJO structural wrapping with optional name prefix and/or suffix (or in some cases, just removal of wrapper name).Default implementation simply returns false.
- Overrides:
 isUnwrappingin classBeanPropertyWriter
 
- 
serializeAsField
public void serializeAsField(java.lang.Object bean, JsonGenerator gen, SerializerProvider prov) throws java.lang.ExceptionDescription copied from class:BeanPropertyWriterMethod called to access property that this bean stands for, from within given bean, and to serialize it as a JSON Object field using appropriate serializer.- Overrides:
 serializeAsFieldin classBeanPropertyWriter- Throws:
 java.lang.Exception
 
- 
assignSerializer
public void assignSerializer(JsonSerializer<java.lang.Object> ser)
Description copied from class:BeanPropertyWriterMethod called to assign value serializer for property- Overrides:
 assignSerializerin classBeanPropertyWriter
 
- 
depositSchemaProperty
public void depositSchemaProperty(JsonObjectFormatVisitor visitor, SerializerProvider provider) throws JsonMappingException
Description copied from class:PropertyWriterTraversal method used for things like JSON Schema generation, or POJO introspection.- Specified by:
 depositSchemaPropertyin interfaceBeanProperty- Overrides:
 depositSchemaPropertyin classBeanPropertyWriter- Parameters:
 visitor- Visitor to used as the callback handler- Throws:
 JsonMappingException
 
 - 
 
 -