-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
RuntimeClasspathDeserializerLocator fails when jackson is in the classpath, but jjwt-jackson isn't #397
Comments
Thanks for reporting this. I think the proper solution for this is to check for The current conditional logic was leftover from old versions of this code that did something like "if Jackson is in the classpath, automatically use the Jackson implementation" before the JSON implementations were extracted to separate artifacts. Now that they're in separate artifacts for pluggability strategies, the underlying knowledge of the JSON provider classes are no longer important in this particular method. A simple workaround in the meantime is to:
I hope that helps! If this doesn't work for any reason, or you have additional feedback, please feel free to add a comment. |
If I use: final Jws<Claims> jws= Jwts.parser().deserializeJsonWith(new OrgJsonDeserializer())... I get the compile error: java: incompatible types: io.jsonwebtoken.io.OrgJsonDeserializer cannot be converted to io.jsonwebtoken.io.Deserializer<java.util.Map<java.lang.String,?>> What is the right incantation? |
…n serializer/deserializer.
Fixes #397 : avoid dependency side effect to affect choice of json se…
jackson is being pulled transitively by some other dependency in my project, but i did not add the jjwt-jackson dependency. The way the RuntimeClasspathDeserializerLocator works, just because it sees the jackson ObjectMapper, then the JacksonDeserializer must be there, which is not true.
I'm getting this error:
The text was updated successfully, but these errors were encountered: