Is there a way to set a upperbound for a generic t...
# serialization
m
Is there a way to set a upperbound for a generic that only allows types that have
@Serializable
?
Copy code
inline fun <reified T> sendReturnForwards(
        key: String,
        value: T,
    ) {
        navController.currentBackStackEntry?.savedStateHandle?.set(key, Json.encodeToString(value))
    }
e
no. you can make the caller pass a serializer into the function though