KV
07/26/2021, 11:45 AMconst val START_ACTION = "start"
enum class Actions(val info: String) {
START(START_ACTION)
}
---------------------------------------------------------------------------
@Serializable
data class ActionRequest(
@SerialName("action_type")
val actionType: Actions ----> enum is compulsory to use here
)
---------------------------------------------------------------------------
val actionRequest = ActionRequest(actionType = START)
---------------------------------------------------------------------------```
Here, I am getting output is "START" rather than "start".
Can someone please help me with how to get the value of action here?KV
07/26/2021, 12:36 PMPaul Griffith
07/26/2021, 2:50 PM@SerialName
annotate the enum instances