java.lang.Object
tools.jackson.databind.introspect.ConcreteBeanPropertyBase
tools.jackson.databind.ser.PropertyWriter
tools.jackson.databind.ser.BeanPropertyWriter
tools.jackson.databind.ser.AnyGetterWriter
- All Implemented Interfaces:
Named,BeanProperty,FullyNamed
Class similar to
BeanPropertyWriter, but that will be used
for serializing JsonAnyGetter annotated
(Map) properties-
Nested Class Summary
Nested classes/interfaces inherited from interface tools.jackson.databind.BeanProperty
BeanProperty.Bogus, BeanProperty.StdNested classes/interfaces inherited from interface tools.jackson.core.util.Named
Named.StringAsNamed -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AnnotatedMemberMethod (or Field) that represents the "any getter"protected MapSerializerprotected final BeanPropertyprotected ValueSerializer<Object>Fields inherited from class tools.jackson.databind.ser.BeanPropertyWriter
_applyView, _cfgSerializationType, _contextAnnotations, _declaredType, _dynamicSerializers, _includeInViews, _inclusion, _internalSettings, _member, _name, _nonTrivialBaseType, _nullSerializer, _suppressableValue, _suppressNulls, _typeSerializer, _wrapperName, MARKER_FOR_EMPTYFields inherited from class tools.jackson.databind.introspect.ConcreteBeanPropertyBase
_aliases, _metadataFields inherited from interface tools.jackson.databind.BeanProperty
EMPTY_FORMAT, EMPTY_INCLUDE -
Constructor Summary
ConstructorsConstructorDescriptionAnyGetterWriter(BeanPropertyWriter parent, BeanProperty property, AnnotatedMember accessor, ValueSerializer<?> serializer) -
Method Summary
Modifier and TypeMethodDescriptionprotected void_serializeObjectNodeEntries(ObjectNode objectNode, JsonGenerator gen, SerializationContext ctxt) Helper method for serializing entries of anObjectNodeas individual properties (for@JsonAnyGettersupport).protected ObjectNode_verifyObjectNode(Object value, SerializationContext ctxt) Helper method to verify that aJsonNodevalue is anObjectNode, throwing a clear error if not (e.g.voidTraversal method used for things like JSON Schema generation, or POJO introspection.voidfixAccess(SerializationConfig config) Method called to ensure that the mutator has proper access rights to be called, as per configuration.voidgetAndFilter(Object bean, JsonGenerator gen, SerializationContext ctxt, PropertyFilter filter) voidgetAndSerialize(Object bean, JsonGenerator gen, SerializationContext ctxt) voidresolve(SerializationContext ctxt) voidserializeAsProperty(Object bean, JsonGenerator gen, SerializationContext ctxt) 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 tools.jackson.databind.ser.BeanPropertyWriter
_depositSchemaProperty, _findAndAddDynamic, _handleSelfReference, _new, assignNullSerializer, assignSerializer, assignTypeSerializer, findPropertyInclusion, get, getAnnotation, getContextAnnotation, getFullName, getInternalSetting, getMember, getName, getSerializationType, getSerializedName, getSerializer, getType, getTypeSerializer, getViews, getWrapperName, hasNullSerializer, hasSerializer, isUnwrapping, removeInternalSetting, rename, serializeAsElement, serializeAsOmittedElement, serializeAsOmittedProperty, setInternalSetting, setNonTrivialBaseType, toString, unwrappingWriter, willSuppressNulls, wouldConflictWithNameMethods inherited from class tools.jackson.databind.ser.PropertyWriter
findAnnotationMethods inherited from class tools.jackson.databind.introspect.ConcreteBeanPropertyBase
findAliases, findFormatOverrides, findPropertyFormat, getMetadata, isRequired, isVirtualMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.jackson.databind.util.FullyNamed
hasName
-
Field Details
-
_property
-
_accessor
Method (or Field) that represents the "any getter" -
_serializer
-
_mapSerializer
-
-
Constructor Details
-
AnyGetterWriter
public AnyGetterWriter(BeanPropertyWriter parent, BeanProperty property, AnnotatedMember accessor, ValueSerializer<?> serializer) - Since:
- 2.19
-
-
Method Details
-
fixAccess
Description copied from class:BeanPropertyWriterMethod 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.- Overrides:
fixAccessin classBeanPropertyWriter
-
resolve
-
getAndSerialize
public void getAndSerialize(Object bean, JsonGenerator gen, SerializationContext ctxt) throws Exception - Throws:
Exception
-
serializeAsProperty
public void serializeAsProperty(Object bean, JsonGenerator gen, SerializationContext ctxt) throws Exception Description 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:
serializeAsPropertyin classBeanPropertyWriter- Throws:
Exception
-
getAndFilter
public void getAndFilter(Object bean, JsonGenerator gen, SerializationContext ctxt, PropertyFilter filter) throws Exception - Throws:
Exception
-
_verifyObjectNode
protected ObjectNode _verifyObjectNode(Object value, SerializationContext ctxt) throws DatabindException Helper method to verify that aJsonNodevalue is anObjectNode, throwing a clear error if not (e.g. ArrayNode).- Throws:
DatabindException- Since:
- 3.2
-
_serializeObjectNodeEntries
protected void _serializeObjectNodeEntries(ObjectNode objectNode, JsonGenerator gen, SerializationContext ctxt) throws Exception Helper method for serializing entries of anObjectNodeas individual properties (for@JsonAnyGettersupport).- Throws:
Exception- Since:
- 3.2
-
depositSchemaProperty
Description copied from class:PropertyWriterTraversal method used for things like JSON Schema generation, or POJO introspection.- Specified by:
depositSchemaPropertyin interfaceBeanProperty- Overrides:
depositSchemaPropertyin classBeanPropertyWriter- Parameters:
v- Visitor to used as the callback handler
-