On Tue, Sep 29, 2020 at 5:24 AM 'Christian' via jackson-user
<
jackso...@googlegroups.com> wrote:
>
> Using JsonFilter annotation and having a FilterProvider which is creating dynamic filters in the background seems a good option.
>
> Just saw the BeanPropertyFilter is being deprecated in favor of PropertyFilter. My first guess was writing the new filter directly based on PropertyFilter, but seems the provider still needs to return BeanPropertyFilter.
> There is just one BeanPropertyFilter to PropertyFilter converting method, but not the other way around? So we would need to build a filter based on the deprecated BeanPropertyFilter?
No, BeanPropertyFilter will be dropped in 3.0, and while it was left
in 2.x (deprecated since 2.3) that was purely for backwards
compatibility.
It should not be implemented directly by new code.
But to keep that compatibility, FilterProvider may look odd -- see
`SimpleFilterProvider.java` for how things should work.
You can often just use that as provider implementation.
So I'd implement `PropertyFilter` and use or sub-class `SimpleFilterProvider`.
-+ Tatu +-
> --
> You received this message because you are subscribed to the Google Groups "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
jackson-user...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-user/c4c4cc2e-b11f-4f73-a7a5-7e57c397061en%40googlegroups.com.