Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.ser

public Class BeanPropertyWriter

extends PropertyWriter
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
com.fasterxml.jackson.databind.ser.VirtualBeanPropertyWriter, com.fasterxml.jackson.databind.ser.impl.FilteredBeanPropertyWriter.SingleView, com.fasterxml.jackson.databind.ser.impl.FilteredBeanPropertyWriter.MultiView, com.fasterxml.jackson.databind.ser.impl.UnwrappingBeanPropertyWriter
Annotations
@JacksonStdImpl
Imports
java.io.IOException, java.lang.annotation.Annotation, java.lang.reflect.Field, .Method, .Type, java.util.HashMap, com.fasterxml.jackson.annotation.JsonInclude, com.fasterxml.jackson.core.JsonGenerator, .SerializableString, com.fasterxml.jackson.core.io.SerializedString, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.annotation.JacksonStdImpl, com.fasterxml.jackson.databind.introspect.*, com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor, com.fasterxml.jackson.databind.jsontype.TypeSerializer, com.fasterxml.jackson.databind.node.ObjectNode, com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap, .UnwrappingBeanPropertyWriter, com.fasterxml.jackson.databind.ser.std.BeanSerializerBase, com.fasterxml.jackson.databind.util.Annotations, .ClassUtil, .NameTransformer

Base bean property handler class, which implements common parts of reflection-based functionality for accessing a property value and serializing it.

Note that current design tries to keep instances immutable (semi-functional style); mostly because these instances are exposed to application code and this is to reduce likelihood of data corruption and synchronization issues.

Field Summary

Modifier and TypeField and Description
protected transient Method
_accessorMethod

Accessor method used to get property value, for method-accessible properties.

protected final JavaType
_cfgSerializationType

Type to use for locating serializer; normally same as return type of the accessor method, but may be overridden by annotations.

protected final transient Annotations
_contextAnnotations

Annotations from context (most often, class that declares property, or in case of sub-class serializer, from that sub-class)

Note

transient just to support JDK serializability; Annotations do not serialize.

protected final JavaType
_declaredType

Type property is declared to have, either in class definition or associated annotations.

protected transient PropertySerializerMap
_dynamicSerializers

In case serializer is not known statically (i.e. _serializer is null), we will use a lookup structure for storing dynamically resolved mapping from type(s) to serializer(s).

protected transient Field
_field

Field that contains the property value for field-accessible properties.

protected final Class<?>[]
_includeInViews

Alternate set of property writers used when view-based filtering is available for the Bean.

protected transient HashMap<Object, Object>
protected final AnnotatedMember
_member

Member (field, method) that represents property and allows access to associated annotations.

protected final SerializedString
_name

Logical name of the property; will be used as the field name under which value for the property is written.

protected JavaType
_nonTrivialBaseType

Base type of the property, if the declared type is "non-trivial"; meaning it is either a structured type (collection, map, array), or parameterized.

protected JsonSerializer<Object>
_nullSerializer

Serializer used for writing out null values, if any: if null, null values are to be suppressed.

protected JsonSerializer<Object>
_serializer

Serializer to use for writing out the value: null if it cannot be known statically; non-null if it can.

protected final Object
_suppressableValue

Value that is considered default value of the property; used for default-value-suppression if enabled.

protected final boolean
_suppressNulls

Whether null values are to be suppressed (nothing written out if value is null) or not.

protected TypeSerializer
_typeSerializer

If property being serialized needs type information to be included this is the type serializer to use.

protected final PropertyName
_wrapperName

Wrapper name to use for this element, if any

public static final Object
MARKER_FOR_EMPTY

Marker object used to indicate "do not serialize if empty"

private static final long

Constructor Summary

AccessConstructor and Description
public
BeanPropertyWriter(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue, Class<?>[] includeInViews)

public
BeanPropertyWriter(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue)

Deprecated
protected
BeanPropertyWriter()

Constructor that may be of use to virtual properties, when there is need for the zero-arg ("default") constructor, and actual initialization is done after constructor call.

protected
BeanPropertyWriter(BeanPropertyWriter base)

"Copy constructor" to be used by filtering sub-classes

protected
protected

Method Summary

Modifier and TypeMethod and Description
protected void
_depositSchemaProperty(ObjectNode propertiesNode, JsonNode schemaNode)

protected JsonSerializer<Object>
protected boolean

Returns:

True if method fully handled self-referential value; false if not (caller is to handle it) or JsonMappingException if there is no way handle it
_handleSelfReference
(Object bean, JsonGenerator gen, SerializerProvider prov, JsonSerializer<?> ser)

Method called to handle a direct self-reference through this property.

protected BeanPropertyWriter
_new(PropertyName newName)

Overridable factory method used by sub-classes

public void
assignNullSerializer(JsonSerializer<Object> nullSer)

Method called to assign null value serializer for property

public void
assignSerializer(JsonSerializer<Object> ser)

Method called to assign value serializer for property

public void
assignTypeSerializer(TypeSerializer typeSer)

Method called to set, reset or clear the configured type serializer for property.

public void
depositSchemaProperty(JsonObjectFormatVisitor
Visitor to used as the callback handler
v
,
SerializerProvider provider)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.depositSchemaProperty.

Implements com.fasterxml.jackson.databind.BeanProperty.depositSchemaProperty.

Traversal method used for things like JSON Schema generation, or POJO introspection.
public void
depositSchemaProperty(ObjectNode
Node which the given property would exist within
propertiesNode
,
SerializerProvider
Provider that can be used for accessing dynamic aspects of serialization processing
provider
)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.depositSchemaProperty.

Deprecated
Attempt to add the output of the given BeanPropertyWriter in the given ObjectNode.
public void
fixAccess(SerializationConfig config)

Method called to ensure that the mutator has proper access rights to be called, as per configuration.

public final Object
get(Object bean)

Method that can be used to access value of the property this Object describes, from given bean instance.

public <A extends Annotation> A
getAnnotation(Class<A> acls)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.getAnnotation.

Implements com.fasterxml.jackson.databind.BeanProperty.getAnnotation.

Method for accessing annotations directly declared for property that this writer is associated with.
public <A extends Annotation> A
getContextAnnotation(Class<A> acls)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.getContextAnnotation.

Implements com.fasterxml.jackson.databind.BeanProperty.getContextAnnotation.

Method for accessing annotations declared in context of the property that this writer is associated with; usually this means annotations on enclosing class for property.
public PropertyName
getFullName()

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.getFullName.

Implements com.fasterxml.jackson.databind.BeanProperty.getFullName.

Method for getting full name definition, including possible format-specific additional properties (such as namespace when using XML backend).
public Type

Returns:

The property type, or null if not found.
getGenericPropertyType
()

Deprecated Since 2.7, to be removed from 2.9, use getType() instead.
Get the generic property type of this property writer.
public Object

Returns:

Value of the setting, if any; null if none.
getInternalSetting
(Object key)

Method for accessing value of specified internal setting.

public AnnotatedMember
getMember()

Implements com.fasterxml.jackson.databind.BeanProperty.getMember.

Method for accessing primary physical entity that represents the property; annotated field, method or constructor property.
public String
getName()

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.getName.

Implements com.fasterxml.jackson.databind.BeanProperty.getName.

Method to get logical name of the property
public Class<?>
getPropertyType()

Deprecated Since 2.7, to be removed from 2.9, use getType() instead.
public Class<?>
public JavaType
public SerializableString
public JsonSerializer<Object>
public JavaType
getType()

Implements com.fasterxml.jackson.databind.BeanProperty.getType.

Method to get declared type of the property.
public TypeSerializer
public Class<?>[]
public PropertyName
getWrapperName()

Implements com.fasterxml.jackson.databind.BeanProperty.getWrapperName.

If property is indicated to be wrapped, name of wrapper element to use.
public boolean
public boolean
public 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).

pack-priv Object
public Object

Returns:

Existing value of the setting, if any (null if none)
removeInternalSetting
(Object key)

Method for removing entry for specified internal setting.

public BeanPropertyWriter
rename(NameTransformer transformer)

public void
serializeAsElement(Object bean, JsonGenerator gen, SerializerProvider prov)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.serializeAsElement.

Alternative to serializeAsField that is used when a POJO is serialized as JSON Array; the difference is that no field names are written.
public void
serializeAsField(Object bean, JsonGenerator gen, SerializerProvider prov)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.serializeAsField.

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.
public void
serializeAsOmittedField(Object bean, JsonGenerator gen, SerializerProvider prov)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.serializeAsOmittedField.

Method called to indicate that serialization of a field was omitted due to filtering, in cases where backend data format does not allow basic omission.
public void
serializeAsPlaceholder(Object bean, JsonGenerator gen, SerializerProvider prov)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.serializeAsPlaceholder.

Method called to serialize a placeholder used in tabular output when real value is not to be included (is filtered out), but when we need an entry so that field indexes will not be off.
public Object

Returns:

Old value of the setting, if any (null if none)
setInternalSetting
(Object key, Object value)

Method for setting specific internal setting to given value

public void
setNonTrivialBaseType(JavaType t)

Method called to define type to consider as "non-trivial" basetype, needed for dynamic serialization resolution for complex (usually container) types

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public BeanPropertyWriter
unwrappingWriter(NameTransformer unwrapper)

Method called create an instance that handles details of unwrapping contained value.

public boolean
public boolean
wouldConflictWithName(PropertyName name)

Method called to check to see if this property has a name that would conflict with a given name.

Inherited from com.fasterxml.jackson.databind.ser.PropertyWriter:
findAnnotation

Field Detail

_accessorMethodback to summary
protected transient Method _accessorMethod

Accessor method used to get property value, for method-accessible properties. Null if and only if _field is null.

`transient` (and non-final) only to support JDK serializability.

_cfgSerializationTypeback to summary
protected final JavaType _cfgSerializationType

Type to use for locating serializer; normally same as return type of the accessor method, but may be overridden by annotations.

_contextAnnotationsback to summary
protected final transient Annotations _contextAnnotations

Annotations from context (most often, class that declares property, or in case of sub-class serializer, from that sub-class)

Note

transient just to support JDK serializability; Annotations do not serialize. At all.

_declaredTypeback to summary
protected final JavaType _declaredType

Type property is declared to have, either in class definition or associated annotations.

_dynamicSerializersback to summary
protected transient PropertySerializerMap _dynamicSerializers

In case serializer is not known statically (i.e. _serializer is null), we will use a lookup structure for storing dynamically resolved mapping from type(s) to serializer(s).

_fieldback to summary
protected transient Field _field

Field that contains the property value for field-accessible properties. Null if and only if _accessorMethod is null.

`transient` (and non-final) only to support JDK serializability.

_includeInViewsback to summary
protected final Class<?>[] _includeInViews

Alternate set of property writers used when view-based filtering is available for the Bean.

_internalSettingsback to summary
protected transient HashMap<Object, Object> _internalSettings
_memberback to summary
protected final AnnotatedMember _member

Member (field, method) that represents property and allows access to associated annotations.

_nameback to summary
protected final SerializedString _name

Logical name of the property; will be used as the field name under which value for the property is written.

Note

do NOT change name of this field; it is accessed by Afterburner module (until 2.4; not directly from 2.5) ALSO NOTE: ... and while it really ought to be `SerializableString`, changing that is also binary-incompatible change. So nope.

_nonTrivialBaseTypeback to summary
protected JavaType _nonTrivialBaseType

Base type of the property, if the declared type is "non-trivial"; meaning it is either a structured type (collection, map, array), or parameterized. Used to retain type information about contained type, which is mostly necessary if type meta-data is to be included.

_nullSerializerback to summary
protected JsonSerializer<Object> _nullSerializer

Serializer used for writing out null values, if any: if null, null values are to be suppressed.

_serializerback to summary
protected JsonSerializer<Object> _serializer

Serializer to use for writing out the value: null if it cannot be known statically; non-null if it can.

_suppressableValueback to summary
protected final Object _suppressableValue

Value that is considered default value of the property; used for default-value-suppression if enabled.

_suppressNullsback to summary
protected final boolean _suppressNulls

Whether null values are to be suppressed (nothing written out if value is null) or not. Note that this is a configuration value during construction, and actual handling relies on setting (or not) of _nullSerializer.

_typeSerializerback to summary
protected TypeSerializer _typeSerializer

If property being serialized needs type information to be included this is the type serializer to use. Declared type (possibly augmented with annotations) of property is used for determining exact mechanism to use (compared to actual runtime type used for serializing actual state).

_wrapperNameback to summary
protected final PropertyName _wrapperName

Wrapper name to use for this element, if any

Since
2.2
MARKER_FOR_EMPTYback to summary
public static final Object MARKER_FOR_EMPTY

Marker object used to indicate "do not serialize if empty"

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.ser.PropertyWriter.serialVersionUID.

Constructor Detail

BeanPropertyWriterback to summary
public BeanPropertyWriter(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue, Class<?>[] includeInViews)
Annotations
@SuppressWarnings:unchecked
Since
2.9 (added `includeInViews` since 2.8)
BeanPropertyWriterback to summary
public BeanPropertyWriter(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue)

Deprecated

Annotations
@Deprecated
BeanPropertyWriterback to summary
protected BeanPropertyWriter()

Constructor that may be of use to virtual properties, when there is need for the zero-arg ("default") constructor, and actual initialization is done after constructor call.

Since
2.5
BeanPropertyWriterback to summary
protected BeanPropertyWriter(BeanPropertyWriter base)

"Copy constructor" to be used by filtering sub-classes

BeanPropertyWriterback to summary
protected BeanPropertyWriter(BeanPropertyWriter base, PropertyName name)
Since
2.5
BeanPropertyWriterback to summary
protected BeanPropertyWriter(BeanPropertyWriter base, SerializedString name)

Method Detail

_depositSchemaPropertyback to summary
protected void _depositSchemaProperty(ObjectNode propertiesNode, JsonNode schemaNode)
_findAndAddDynamicback to summary
protected JsonSerializer<Object> _findAndAddDynamic(PropertySerializerMap map, Class<?> type, SerializerProvider provider) throws JsonMappingException
_handleSelfReferenceback to summary
protected boolean _handleSelfReference(Object bean, JsonGenerator gen, SerializerProvider prov, JsonSerializer<?> ser) throws IOException

Method called to handle a direct self-reference through this property. Method can choose to indicate an error by throwing JsonMappingException; fully handle serialization (and return true); or indicate that it should be serialized normally (return false).

Default implementation will throw JsonMappingException if SerializationFeature#FAIL_ON_SELF_REFERENCES is enabled; or return false if it is disabled.

Returns:boolean

True if method fully handled self-referential value; false if not (caller is to handle it) or JsonMappingException if there is no way handle it

_newback to summary
protected BeanPropertyWriter _new(PropertyName newName)

Overridable factory method used by sub-classes

Since
2.6
assignNullSerializerback to summary
public void assignNullSerializer(JsonSerializer<Object> nullSer)

Method called to assign null value serializer for property

assignSerializerback to summary
public void assignSerializer(JsonSerializer<Object> ser)

Method called to assign value serializer for property

assignTypeSerializerback to summary
public void assignTypeSerializer(TypeSerializer typeSer)

Method called to set, reset or clear the configured type serializer for property.

Since
2.6
depositSchemaPropertyback to summary
public void depositSchemaProperty(JsonObjectFormatVisitor v, SerializerProvider provider) throws JsonMappingException

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.depositSchemaProperty.

Implements com.fasterxml.jackson.databind.BeanProperty.depositSchemaProperty.

Doc from com.fasterxml.jackson.databind.ser.PropertyWriter.depositSchemaProperty.

Traversal method used for things like JSON Schema generation, or POJO introspection.

Parameters
v:JsonObjectFormatVisitor

Doc from com.fasterxml.jackson.databind.BeanProperty.depositSchemaProperty.

Visitor to used as the callback handler

Annotations
@Override
depositSchemaPropertyback to summary
public void depositSchemaProperty(ObjectNode propertiesNode, SerializerProvider provider) throws JsonMappingException

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.depositSchemaProperty.

Deprecated

Attempt to add the output of the given BeanPropertyWriter in the given ObjectNode. Otherwise, add the default schema JsonNode in place of the writer's output

Parameters
propertiesNode:ObjectNode

Node which the given property would exist within

provider:SerializerProvider

Provider that can be used for accessing dynamic aspects of serialization processing

Annotations
@Override
@Deprecated
fixAccessback to summary
public void fixAccess(SerializationConfig config)

Method called to ensure that the mutator has proper access rights to be called, as per configuration. Overridden by implementations that have mutators that require access, fields and setters.

Since
2.8.3
getback to summary
public final Object get(Object bean) throws Exception

Method that can be used to access value of the property this Object describes, from given bean instance.

Note

method is final as it should not need to be overridden -- rather, calling method(s) (serializeAsField) should be overridden to change the behavior

getAnnotationback to summary
public <A extends Annotation> A getAnnotation(Class<A> acls)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.getAnnotation.

Implements com.fasterxml.jackson.databind.BeanProperty.getAnnotation.

Doc from com.fasterxml.jackson.databind.ser.PropertyWriter.getAnnotation.

Method for accessing annotations directly declared for property that this writer is associated with.

Annotations
@Override
getContextAnnotationback to summary
public <A extends Annotation> A getContextAnnotation(Class<A> acls)

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.getContextAnnotation.

Implements com.fasterxml.jackson.databind.BeanProperty.getContextAnnotation.

Doc from com.fasterxml.jackson.databind.ser.PropertyWriter.getContextAnnotation.

Method for accessing annotations declared in context of the property that this writer is associated with; usually this means annotations on enclosing class for property.

Annotations
@Override
getFullNameback to summary
public PropertyName getFullName()

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.getFullName.

Implements com.fasterxml.jackson.databind.BeanProperty.getFullName.

Doc from com.fasterxml.jackson.databind.BeanProperty.getFullName.

Method for getting full name definition, including possible format-specific additional properties (such as namespace when using XML backend).

Annotations
@Override
getGenericPropertyTypeback to summary
public Type getGenericPropertyType()

Deprecated

Since 2.7, to be removed from 2.9, use getType() instead.

Get the generic property type of this property writer.

Returns:Type

The property type, or null if not found.

Annotations
@Deprecated
getInternalSettingback to summary
public Object getInternalSetting(Object key)

Method for accessing value of specified internal setting.

Returns:Object

Value of the setting, if any; null if none.

getMemberback to summary
public AnnotatedMember getMember()

Implements com.fasterxml.jackson.databind.BeanProperty.getMember.

Doc from com.fasterxml.jackson.databind.BeanProperty.getMember.

Method for accessing primary physical entity that represents the property; annotated field, method or constructor property.

Annotations
@Override
getNameback to summary
public String getName()

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.getName.

Implements com.fasterxml.jackson.databind.BeanProperty.getName.

Doc from com.fasterxml.jackson.databind.BeanProperty.getName.

Method to get logical name of the property

Annotations
@Override
getPropertyTypeback to summary
public Class<?> getPropertyType()

Deprecated

Since 2.7, to be removed from 2.9, use getType() instead.

Annotations
@Deprecated
getRawSerializationTypeback to summary
public Class<?> getRawSerializationType()

Deprecated

Annotations
@Deprecated
getSerializationTypeback to summary
public JavaType getSerializationType()
getSerializedNameback to summary
public SerializableString getSerializedName()
getSerializerback to summary
public JsonSerializer<Object> getSerializer()
getTypeback to summary
public JavaType getType()

Implements com.fasterxml.jackson.databind.BeanProperty.getType.

Doc from com.fasterxml.jackson.databind.BeanProperty.getType.

Method to get declared type of the property.

Annotations
@Override
getTypeSerializerback to summary
public TypeSerializer getTypeSerializer()
Since
2.6
getViewsback to summary
public Class<?>[] getViews()
getWrapperNameback to summary
public PropertyName getWrapperName()

Implements com.fasterxml.jackson.databind.BeanProperty.getWrapperName.

Doc from com.fasterxml.jackson.databind.BeanProperty.getWrapperName.

If property is indicated to be wrapped, name of wrapper element to use.

Annotations
@Override
hasNullSerializerback to summary
public boolean hasNullSerializer()
hasSerializerback to summary
public boolean hasSerializer()
isUnwrappingback to summary
public 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).

Default implementation simply returns false.

Since
2.3
readResolveback to summary
pack-priv Object readResolve()
removeInternalSettingback to summary
public Object removeInternalSetting(Object key)

Method for removing entry for specified internal setting.

Returns:Object

Existing value of the setting, if any (null if none)

renameback to summary
public BeanPropertyWriter rename(NameTransformer transformer)
serializeAsElementback to summary
public void serializeAsElement(Object bean, JsonGenerator gen, SerializerProvider prov) throws Exception

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.serializeAsElement.

Alternative to serializeAsField that is used when a POJO is serialized as JSON Array; the difference is that no field names are written.

Annotations
@Override
Since
2.3
serializeAsFieldback to summary
public void serializeAsField(Object bean, JsonGenerator gen, SerializerProvider prov) throws Exception

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.serializeAsField.

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.

Annotations
@Override
serializeAsOmittedFieldback to summary
public void serializeAsOmittedField(Object bean, JsonGenerator gen, SerializerProvider prov) throws Exception

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.serializeAsOmittedField.

Method called to indicate that serialization of a field was omitted due to filtering, in cases where backend data format does not allow basic omission.

Annotations
@Override
Since
2.3
serializeAsPlaceholderback to summary
public void serializeAsPlaceholder(Object bean, JsonGenerator gen, SerializerProvider prov) throws Exception

Implements abstract com.fasterxml.jackson.databind.ser.PropertyWriter.serializeAsPlaceholder.

Method called to serialize a placeholder used in tabular output when real value is not to be included (is filtered out), but when we need an entry so that field indexes will not be off. Typically this should output null or empty String, depending on datatype.

Annotations
@Override
Since
2.1
setInternalSettingback to summary
public Object setInternalSetting(Object key, Object value)

Method for setting specific internal setting to given value

Returns:Object

Old value of the setting, if any (null if none)

setNonTrivialBaseTypeback to summary
public void setNonTrivialBaseType(JavaType t)

Method called to define type to consider as "non-trivial" basetype, needed for dynamic serialization resolution for complex (usually container) types

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
unwrappingWriterback to summary
public BeanPropertyWriter unwrappingWriter(NameTransformer unwrapper)

Method called create an instance that handles details of unwrapping contained value.

willSuppressNullsback to summary
public boolean willSuppressNulls()
wouldConflictWithNameback to summary
public boolean wouldConflictWithName(PropertyName name)

Method called to check to see if this property has a name that would conflict with a given name.

Since
2.6