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

Correct handling of SerialKind.CONTEXTUAL in YamlInput class #582

Merged
merged 2 commits into from
Jun 30, 2024

Conversation

OptimumCode
Copy link
Contributor

@OptimumCode OptimumCode commented Jun 24, 2024

Hi, @charleskorn.

This PR corrects how YamlInput handles the serialization of fields marked with @Contextual annotation.
Instead of forcing the serializer to call beginStructure it extracts the actual definition and creates the appropriate YamlInput based on that definition where applicable.

Please, take a look at the PR once you have time. Let me know if you have any remarks/suggestions regarding the change

Resolves #568

@OptimumCode OptimumCode changed the title Correct handling for contextual kind Correct handling of SerialKind.CONTEXTUAL in YamlInput class Jun 24, 2024
Copy link
Owner

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @OptimumCode!

I have one comment about the test, but otherwise this looks good to me.

Copy link
Owner

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @OptimumCode!

@charleskorn charleskorn merged commit 4930c0d into charleskorn:main Jun 30, 2024
1 check passed
@OptimumCode OptimumCode deleted the issue_#568 branch July 1, 2024 07:23
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.

IllegalStateException: Must call beginStructure() and use returned Decoder when using @Contextual
2 participants