-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
JacksonJrDecoder is not able to deserialize generics #2296
Comments
yvasyliev
added a commit
to yvasyliev/feign
that referenced
this issue
Jan 20, 2024
velo
added a commit
that referenced
this issue
Jan 22, 2024
* Allow generics deserialization by JacksonJrDecoder Fixes #2296 * Update JacksonJrDecoder.java * Update JacksonCodecTest.java --------- Co-authored-by: Marvin <[email protected]>
velo
added a commit
that referenced
this issue
Oct 7, 2024
* Allow generics deserialization by JacksonJrDecoder Fixes #2296 * Update JacksonJrDecoder.java * Update JacksonCodecTest.java --------- Co-authored-by: Marvin <[email protected]>
velo
added a commit
that referenced
this issue
Oct 8, 2024
* Allow generics deserialization by JacksonJrDecoder Fixes #2296 * Update JacksonJrDecoder.java * Update JacksonCodecTest.java --------- Co-authored-by: Marvin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Although
jackson-jr
library is capable of generics deserialization,feign-jackson-jr
module throwsDecodeException
when you try to decode the response.How to reproduce
I created a simple demo to demonstrate this:
Output:
Tested with:
Initial investigation
I see two problems here:
feign.jackson.jr.JacksonJrDecoder#findTransformer
always throwsDecodeException
unlesstype
is instance ofClass
,List
orMap
.feign.jackson.jr.JacksonJrDecoder#findTransformer
hasprivate static
modifiers. (why?)Suggestion
jackson-jr
to hand the control over generics deserialization. Because nowJacksonJrDecoder
is very limited.feign.jackson.jr.JacksonJrDecoder#findTransformer
overridable.Both problems requires very few code changes, and I'll try to handle both of them.
Actually, if problem 2 will be solved first, there is no urgent need to solve problem 1. Because in this case the user will be able to handle deserialization by extending
JacksonJrDecoder
. Yet both changes would be great to see.The text was updated successfully, but these errors were encountered: