Is there any simple way to use the ordinal of an enum instead of the name for serializing/deserializ...
z
Is there any simple way to use the ordinal of an enum instead of the name for serializing/deserializing?
Will I just have to write a custom serializer for the SortBy enum
Copy code
enum class SortBy {
    RELEVANCE,
    UPLOAD_DATE,
    VIEW_COUNT,
    RATING
}

@Serializable
data class SearchFilter(
    val sortBy: SortBy
)
z
thanks