You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imagine a class whose getters in some cases throw specific exception. JSON serialization should respond to these exceptions by not serializing given field.
On server, I solved this using com.fasterxml.jackson.databind.ser.PropertyFilter, but I can't find a way to do anything similar in gwt-jackson.
I'm aware that @JsonFilter is not supported, so I tried other approaches but without success.
So I tried to find a way to subclass those two classes during generator's run, but I couldn't find a way to inject them instead of BeanPropertySerializer/AbstractObjectMapper:
Imagine a class whose getters in some cases throw specific exception. JSON serialization should respond to these exceptions by not serializing given field.
On server, I solved this using
com.fasterxml.jackson.databind.ser.PropertyFilter
, but I can't find a way to do anything similar in gwt-jackson.I'm aware that
@JsonFilter
is not supported, so I tried other approaches but without success.Exception's stacktrace is:
BeanPropertySerializer:93
BeanPropertySerializer:103
AbstractObjectMapper:126
So I tried to find a way to subclass those two classes during generator's run, but I couldn't find a way to inject them instead of
BeanPropertySerializer
/AbstractObjectMapper
:BeanPropertySerializer
as default implementation seems to be hardcoded at BeanJsonSerializerCreator:182AbstractObjectMapper
as default superclass seems to be hardcoded at AbstractBeanJsonCreator:159Anything else I could try? Any guidance for creating a patch?
The text was updated successfully, but these errors were encountered: