Interface BeanPropertyFilter
-
- All Known Implementing Classes:
SimpleBeanPropertyFilter,SimpleBeanPropertyFilter.FilterExceptFilter,SimpleBeanPropertyFilter.SerializeExceptFilter
@Deprecated public interface BeanPropertyFilterDeprecated.Since 2.3: usePropertyFilterinstead.Interface that defines API for filter objects use (as configured usingJsonFilter) for filtering bean properties to serialize.Starting with version 2.3 this class is deprecated; use
PropertyFilterinstead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voiddepositSchemaProperty(BeanPropertyWriter writer, JsonObjectFormatVisitor objectVisitor, SerializerProvider provider)Deprecated.Method called byBeanSerializerto let the filter determine whether, and in what form the given property exist within the parent, or root, schema.voiddepositSchemaProperty(BeanPropertyWriter writer, ObjectNode propertiesNode, SerializerProvider provider)Deprecated.Since 2.3: new code should use the alternativedepositSchemaPropertymethodvoidserializeAsField(java.lang.Object pojo, JsonGenerator jgen, SerializerProvider prov, BeanPropertyWriter writer)Deprecated.Method called byBeanSerializerto let filter decide what to do with given bean property value: the usual choices are to either filter out (i.e.
-
-
-
Method Detail
-
serializeAsField
void serializeAsField(java.lang.Object pojo, JsonGenerator jgen, SerializerProvider prov, BeanPropertyWriter writer) throws java.lang.ExceptionDeprecated.Method called byBeanSerializerto let filter decide what to do with given bean property value: the usual choices are to either filter out (i.e. do nothing) or write using givenBeanPropertyWriter, although filters can choose other to do something different altogether.Typical implementation is something like:
if (include(writer)) { writer.serializeAsField(pojo, jgen, prov); }- Parameters:
pojo- Object that contains property value to serializejgen- Generator use for serializing valueprov- Provider that can be used for accessing dynamic aspects of serialization processingwriter- Default bean property serializer to use- Throws:
java.lang.Exception
-
depositSchemaProperty
@Deprecated void depositSchemaProperty(BeanPropertyWriter writer, ObjectNode propertiesNode, SerializerProvider provider) throws JsonMappingException
Deprecated.Since 2.3: new code should use the alternativedepositSchemaPropertymethodMethod called byBeanSerializerto let the filter determine whether, and in what form the given property exist within the parent, or root, schema. Filters can omit adding the property to the node, or choose the form of the schema value for the property.Typical implementation is something like:
if (include(writer)) { writer.depositSchemaProperty(propertiesNode, provider); }- Parameters:
writer- Bean property writer to use to create schema valuepropertiesNode- Node which the given property would exist withinprovider- Provider that can be used for accessing dynamic aspects of serialization processing- Throws:
JsonMappingException- Since:
- 2.1
-
depositSchemaProperty
void depositSchemaProperty(BeanPropertyWriter writer, JsonObjectFormatVisitor objectVisitor, SerializerProvider provider) throws JsonMappingException
Deprecated.Method called byBeanSerializerto let the filter determine whether, and in what form the given property exist within the parent, or root, schema. Filters can omit adding the property to the node, or choose the form of the schema value for the propertyTypical implementation is something like:
if (include(writer)) { writer.depositSchemaProperty(objectVisitor, provider); }- Parameters:
writer- Bean property serializer to use to create schema valueobjectVisitor- JsonObjectFormatVisitor which should be aware of the property's existenceprovider- Provider that can be used for accessing dynamic aspects of serialization processing- Throws:
JsonMappingException- Since:
- 2.1
-
-