com.fasterxml.jackson.annotation.JsonFilter )
for filtering bean properties to serialize.
Note that since this is an interface, it is
strongly recommended that custom implementations extend
tools.,
to avoid backwards compatibility issues in case interface needs to change.
| Modifier and Type | Method and Description |
|---|---|
| public void | depositSchemaProperty(PropertyWriter
Bean property serializer to use to create schema value writer, JsonObjectFormatVisitor JsonObjectFormatVisitor which should be aware of
the property's existence v, SerializationContext Serialization context ctxt)Method called by |
| public void | serializeAsElement(Object
Element value being serializerd elementValue, JsonGenerator Generator use for serializing value g, SerializationContext Provider that can be used for accessing dynamic aspects of serialization
processing ctxt, PropertyWriter Object called to do actual serialization of the field, if not filtered out writer)Method called by container to let the filter decide what to do with given element
value:
the usual choices are to either filter out (i.e.
do nothing) or write using given |
| public void | serializeAsProperty(Object
Object that contains property value to serialize pojo, JsonGenerator Generator use for serializing value g, SerializationContext Provider that can be used for accessing dynamic aspects of serialization
processing ctxt, PropertyWriter Object called to do actual serialization of the field, if not filtered out writer)Method called by |
| depositSchemaProperty | back to summary |
|---|---|
| public void depositSchemaProperty(PropertyWriter writer, JsonObjectFormatVisitor v, SerializationContext ctxt) Method called by Typical implementation is something like:
if (include(writer)) {
writer.depositSchemaProperty(objectVisitor, provider);
}
| |
| serializeAsElement | back to summary |
|---|---|
| public void serializeAsElement(Object elementValue, JsonGenerator g, SerializationContext ctxt, PropertyWriter writer) throws Exception Method called by container to let the filter decide what to do with given element
value:
the usual choices are to either filter out (i.e.
do nothing) or write using given Typical implementation is something like:
if (include(writer)) {
writer.serializeAsElement(pojo, gen, prov);
}
| |
| serializeAsProperty | back to summary |
|---|---|
| public void serializeAsProperty(Object pojo, JsonGenerator g, SerializationContext ctxt, PropertyWriter writer) throws Exception Method called by Typical implementation is something like:
if (include(writer)) {
writer.serializeAsProperty(pojo, gen, prov);
}
| |