public class UnwrappingBeanPropertyWriter extends BeanPropertyWriter implements 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
Modifier and Type | Field and Description |
---|---|
protected NameTransformer |
_nameTransformer
Transformer used to add prefix and/or suffix for properties
of unwrapped POJO.
|
_accessorMethod, _cfgSerializationType, _contextAnnotations, _declaredType, _dynamicSerializers, _field, _includeInViews, _internalSettings, _member, _name, _nonTrivialBaseType, _nullSerializer, _serializer, _suppressableValue, _suppressNulls, _typeSerializer, _wrapperName, MARKER_FOR_EMPTY
_aliases, _metadata
EMPTY_FORMAT, EMPTY_INCLUDE
Modifier | Constructor and Description |
---|---|
|
UnwrappingBeanPropertyWriter(BeanPropertyWriter base,
NameTransformer unwrapper) |
protected |
UnwrappingBeanPropertyWriter(UnwrappingBeanPropertyWriter base,
NameTransformer transformer,
com.fasterxml.jackson.core.io.SerializedString name) |
Modifier and Type | Method and Description |
---|---|
protected void |
_depositSchemaProperty(ObjectNode propertiesNode,
JsonNode schemaNode) |
protected JsonSerializer<Object> |
_findAndAddDynamic(PropertySerializerMap map,
Class<?> type,
SerializerProvider provider) |
protected UnwrappingBeanPropertyWriter |
_new(NameTransformer transformer,
com.fasterxml.jackson.core.io.SerializedString newName)
Overridable factory method used by sub-classes
|
void |
assignSerializer(JsonSerializer<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(Object bean,
com.fasterxml.jackson.core.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.
|
_handleSelfReference, _new, 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
protected final NameTransformer _nameTransformer
public UnwrappingBeanPropertyWriter(BeanPropertyWriter base, NameTransformer unwrapper)
protected UnwrappingBeanPropertyWriter(UnwrappingBeanPropertyWriter base, NameTransformer transformer, com.fasterxml.jackson.core.io.SerializedString name)
public UnwrappingBeanPropertyWriter rename(NameTransformer transformer)
rename
in class BeanPropertyWriter
protected UnwrappingBeanPropertyWriter _new(NameTransformer transformer, com.fasterxml.jackson.core.io.SerializedString newName)
public boolean isUnwrapping()
BeanPropertyWriter
Default implementation simply returns false.
isUnwrapping
in class BeanPropertyWriter
public void serializeAsField(Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider prov) throws Exception
BeanPropertyWriter
serializeAsField
in class BeanPropertyWriter
Exception
public void assignSerializer(JsonSerializer<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
protected void _depositSchemaProperty(ObjectNode propertiesNode, JsonNode schemaNode)
_depositSchemaProperty
in class BeanPropertyWriter
protected JsonSerializer<Object> _findAndAddDynamic(PropertySerializerMap map, Class<?> type, SerializerProvider provider) throws JsonMappingException
_findAndAddDynamic
in class BeanPropertyWriter
JsonMappingException
Copyright © 2008–2022 FasterXML. All rights reserved.