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

Supporting other primitives as backing types for enums #612

Merged
merged 5 commits into from
Aug 26, 2016

Conversation

jcogilvie
Copy link
Contributor

This pull request should allow us to support enums that are non-String. As a consequence, toString no longer makes sense as the default serialization method, so instead we create value() which does the same thing.

toString is still overridden iff the type is String-backed (to preserve backwards compatibility), but is no longer annotated as @JsonValue.

ITs have been added and broken tests updated.

@joelittlejohn
Copy link
Owner

This looks great. Two comments:

Could you remove the pom.xml changes from this PR?

Could you add an integration test that proves that serializing and deserializing some JSON with these enums actually works?

Cheers

@jcogilvie
Copy link
Contributor Author

Done and done.

@joelittlejohn joelittlejohn added this to the 0.4.25 milestone Aug 26, 2016
@joelittlejohn joelittlejohn merged commit 528eb22 into joelittlejohn:master Aug 26, 2016
@jcogilvie jcogilvie deleted the support-int-enums branch September 2, 2016 21:00
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