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

JSON POJO unmarshalling #369

Closed
lhazlewood opened this issue Jul 30, 2018 · 2 comments · Fixed by #495
Closed

JSON POJO unmarshalling #369

lhazlewood opened this issue Jul 30, 2018 · 2 comments · Fixed by #495
Assignees
Milestone

Comments

@lhazlewood
Copy link
Contributor

Per the discussion in #214:

Improve the exception message:

String msg = "Cannot convert existing claim value of type " + value.getClass() + " to desired type " + requiredType + ". JJWT only converts simple Date, Long, Integer, Short and Byte types automatically. Anything more complex is expected to be already converted to your desired type by the JSON Deserializer implementation. You may specify a custom Deserializer for a JwtParser with the desired conversion configuration via the JwtParser#deserializeJsonWith method. See https://github.com/jwtk/jjwt/README.md#whatever for more information.";

Plus:

  • JavaDoc for the Claims#get method (dunno why it is missing)
  • supporting new JacksonDeserializer(Maps.of("user", User.class))
  • public documentation on marshaling/unmarshaling and how to do it w/ JJWT (which is the https://github.com/jwtk/jjwt/README.md#whatever link in the above exception message).

cc @cbudtz

@lhazlewood lhazlewood added this to the 0.10.0 milestone Jul 30, 2018
@lhazlewood
Copy link
Contributor Author

Didn't have time to get this in 0.10.0. We should be able to get this in the next release.

@lhazlewood lhazlewood modified the milestones: 0.10.0, 0.11.0 Aug 1, 2018
@lhazlewood lhazlewood changed the title claims.get(name, Class<T> type) enhancements JSON POJO marshalling Aug 23, 2018
@lhazlewood lhazlewood changed the title JSON POJO marshalling JSON POJO unmarshalling Oct 12, 2018
@javapapo
Copy link

+1 on this . thanks

bdemers added a commit that referenced this issue Sep 19, 2019
@bdemers bdemers self-assigned this Sep 19, 2019
bdemers added a commit that referenced this issue Sep 27, 2019
bdemers added a commit that referenced this issue Sep 27, 2019
 - Adds new constructor JacksonDeserializer(Map<String, Class> claimTypeMap), which will enable later calls Claims.get("key", CustomType.class) to work as expectd
 - Adds new Maps utility class to make map creation fluent

Fixes: #369
bdemers added a commit that referenced this issue Sep 30, 2019
- Adds new constructor JacksonDeserializer(Map<String, Class> claimTypeMap), which will enable later calls Claims.get("key", CustomType.class) to work as expectd
 - Adds new Maps utility class to make map creation fluent

Fixes: #369
bdemers added a commit that referenced this issue Oct 3, 2019
- Adds new constructor JacksonDeserializer(Map<String, Class> claimTypeMap), which will enable later calls Claims.get("key", CustomType.class) to work as expectd
 - Adds new Maps utility class to make map creation fluent

Fixes: #369
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

Successfully merging a pull request may close this issue.

3 participants