-
Notifications
You must be signed in to change notification settings - Fork 400
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
Allow more than one value map to the same enum value with @JsonValue
#1380
Comments
@JsonValue
@JsonValue
I would assume a new decorator eg. I wouldn't know if this is possible since I have not looked deeply at the code. |
Maybe the |
Some updates to this? |
Hi, any update on this issue? 🙏 |
Currently, we can use
@JsonValue
in an enum to define what value maps to it.Now, I want to map more than one value to the same enum value. I cannot do this unless I write a custom
JsonConverter
for the enum.This issue proposes that we have a way to tell
json_serializable
that we want more than one value to be mapped to our enum value.For instance:
The text was updated successfully, but these errors were encountered: