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

Test record @JsonSerialize and @JsonDeserialize #4769

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

JooHyukKim
Copy link
Member

@cowtowncoder cowtowncoder merged commit 111cfdc into FasterXML:2.18 Oct 30, 2024
9 checks passed
@JooHyukKim JooHyukKim deleted the test-discussion-188 branch October 30, 2024 04:09
@cowtowncoder
Copy link
Member

It's fine to get more coverage, but further testing showed that deserializer for submitter is being called -- it's just that due to polymorphic handling, method called is different than what they expected: deserializeWithType(..) with fails before having a chance to delegate to other deserialize(...) method.

@JooHyukKim
Copy link
Member Author

but further testing showed that deserializer for submitter is being called

Oh wow, I must have missed notification for that finding.
Is there a link to comment, email or anything see the testing?

@cowtowncoder
Copy link
Member

Sorry, I debugged it locally to see method actually getting called, overriding deserializeWithType() which does indeed get called; and that will call method in TypeDeserializer which (if it didn't throw exception) would call one of regular deserialize() methods.

But the example was very convoluted with odd type definitions which are really hard to reason about -- so I am not really sure what was expectation for things to happen.

I probably should have suggested the usual "try serializing values you are hoping to deserialize to see what JSON structure is expected" to show why type declaration are wrong.

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 this pull request may close these issues.

2 participants