In my common module of KMM, I have this data class...
# multiplatform
c
In my common module of KMM, I have this data class:
Copy code
data class UserRole(
    val entity: Entity,                            
    val role: Role,
    val entityId: String
) {

    fun isAdmin() = role == Role.ADMIN
}
When I do serialize it, I get
admin
as a property. How can I avoid that?
g
Did you try @Transient on the function? (the kotlinx one) What tool do you use for serialization?
c
This is a Firebase project. Firebase supports @Exclude annotation for Android side, but not sure how to do it in common package.
g
Googled and found IgnoreExtraProperties for Firebase.