Serde enum fields using value of the enum #1650
vivek-rao-1985
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an object with the following structure -
I wish to serialize status into an enum and have the following code -
Implementation for
SwitchStatus
-Wrote a test to see if it works -
I get this error -
No enum constant SwitchStatus.1
I'm basically trying to tell micronaut to use
SwitchStatus::getStatus()
while deserializing the input integer intoSwitchStatus
. How can I accomplish this?Beta Was this translation helpful? Give feedback.
All reactions