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

Improve support for Java Record deserialization (field order) #157

Closed
darxriggs opened this issue Jun 16, 2024 · 2 comments
Closed

Improve support for Java Record deserialization (field order) #157

darxriggs opened this issue Jun 16, 2024 · 2 comments

Comments

@darxriggs
Copy link

Basic support was added in #148. Its implementation assumes the same order of fields in the Java record and JSON.

This issue is about improving the deserialization to support any order of fields in the JSON.
Currently deserialization fails with Failed to create an instance of SomeClass due to (java.lang.IllegalArgumentException): argument type mismatch in case the field order doesn't match (see this comment on the initial implementation).

@cowtowncoder
Copy link
Member

Agreed: not sure how I missed this in review -- order can not and must not be assumed; matching strictly by name. We need tests for different order at minimum.

cc @TomaszGaweda

@cowtowncoder
Copy link
Member

Initial Record deserialization support reverted due to issues, closing.

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

2 participants