Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More (de)serialization customization (JsonFilter or equivalent) #164

Open
gkresic opened this issue Jan 17, 2020 · 0 comments
Open

More (de)serialization customization (JsonFilter or equivalent) #164

gkresic opened this issue Jan 17, 2020 · 0 comments

Comments

@gkresic
Copy link

gkresic commented Jan 17, 2020

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:

Anything else I could try? Any guidance for creating a patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant