public class UnwrappingBeanPropertyWriter extends BeanPropertyWriter implements java.io.Serializable
BeanPropertyWriter
which will handle unwrapping
of JSON Object (including of properties of Object within surrounding
JSON object, and not as sub-object).BeanProperty.Bogus, BeanProperty.Std
MARKER_FOR_EMPTY
EMPTY_FORMAT, EMPTY_INCLUDE
Constructor and Description |
---|
UnwrappingBeanPropertyWriter(BeanPropertyWriter base,
NameTransformer unwrapper) |
Modifier and Type | Method and Description |
---|---|
void |
assignSerializer(JsonSerializer<java.lang.Object> ser)
Method called to assign value serializer for property
|
void |
depositSchemaProperty(JsonObjectFormatVisitor visitor,
SerializerProvider provider)
Traversal method used for things like JSON Schema generation, or
POJO introspection.
|
boolean |
isUnwrapping()
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).
|
UnwrappingBeanPropertyWriter |
rename(NameTransformer transformer) |
void |
serializeAsField(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.
|
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
findAnnotation
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
public UnwrappingBeanPropertyWriter(BeanPropertyWriter base, NameTransformer unwrapper)
public UnwrappingBeanPropertyWriter rename(NameTransformer transformer)
rename
in class BeanPropertyWriter
public boolean isUnwrapping()
BeanPropertyWriter
Default implementation simply returns false.
isUnwrapping
in class BeanPropertyWriter
public void serializeAsField(java.lang.Object bean, JsonGenerator gen, SerializerProvider prov) throws java.lang.Exception
BeanPropertyWriter
serializeAsField
in class BeanPropertyWriter
java.lang.Exception
public void assignSerializer(JsonSerializer<java.lang.Object> ser)
BeanPropertyWriter
assignSerializer
in class BeanPropertyWriter
public void depositSchemaProperty(JsonObjectFormatVisitor visitor, SerializerProvider provider) throws JsonMappingException
PropertyWriter
depositSchemaProperty
in interface BeanProperty
depositSchemaProperty
in class BeanPropertyWriter
visitor
- Visitor to used as the callback handlerJsonMappingException
Copyright © 2010 - 2020 Adobe. All Rights Reserved