-
Notifications
You must be signed in to change notification settings - Fork 191
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
Fixes deserialization of enums when using booleans instead of strings #482
Fixes deserialization of enums when using booleans instead of strings #482
Conversation
Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com>
Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com>
Before I merge, what tests would fail if |
Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com>
I just tried it and actually no test fails, it's just an unexpected behaviour to implicitly support boolean deserialization with the Enum Deserializer. If you'd like to I could move the new deserialization logic to the existing Deserializer. |
Yes yes! |
Also please update documentation/README. |
d79afc5
to
b372d24
Compare
I made the recommended changes and updated the CHANGELOG.md along with the Javadoc. |
Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com>
b372d24
to
125b78f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! No need to change anything in README.
…#482) * Fixes deserialization of enums when using booleans instead of strings Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com> * Fixes CHANGELOG.md Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com> * Fixes checkstyle failure Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com> * Include boolean support in existing JsonEnum.Deserializer Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com> --------- Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com> (cherry picked from commit 5af5674) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…#482) (#488) * Fixes deserialization of enums when using booleans instead of strings * Fixes CHANGELOG.md * Fixes checkstyle failure * Include boolean support in existing JsonEnum.Deserializer --------- (cherry picked from commit 5af5674) Signed-off-by: Patrick Schlindwein <patrick.schlindwein@bolindalabs.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Allows for boolean values for enums which support those, eg.
DynamicMapping
andRefresh
.Issues Resolved
Fixes #256
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.