You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to decode a json with one of the JsonNames will result in a SerializationException: kotlinx.serialization.SerializationException: com.zorabots.mqtt.model.filtering.SomeEnum does not contain element with name 'someValue'
Expected behavior
"SOME_VALUE", "someValue", "some_value" or "test" should work, instead of only "SOME_VALUE".
Environment
Kotlin version: 1.5.0
Library version: 1.2.0
Kotlin platforms: JVM
Gradle version: 6.1.1
The text was updated successfully, but these errors were encountered:
Describe the bug
The @JsonNames annotation to provide alternative names when decoding json does not work on enums.
To Reproduce
Create an enum with @JsonNames, for example:
Trying to decode a json with one of the JsonNames will result in a SerializationException:
kotlinx.serialization.SerializationException: com.zorabots.mqtt.model.filtering.SomeEnum does not contain element with name 'someValue'
Expected behavior
"SOME_VALUE", "someValue", "some_value" or "test" should work, instead of only "SOME_VALUE".
Environment
The text was updated successfully, but these errors were encountered: