Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save navczydev/23cc3910391c5d84fd8b0dae961bff51 to your computer and use it in GitHub Desktop.
Save navczydev/23cc3910391c5d84fd8b0dae961bff51 to your computer and use it in GitHub Desktop.
@OptIn(ExperimentalSerializationApi::class)
@Serializable
data class Expert(
val id: Int,
val name: String,
val category: Category,
val publishedArticles: Int?,
// @EncodeDefault default ALWAYS
@EncodeDefault val recentEventLink: String? = null
)
enum class Category {
ANDROID, KOTLIN, DART, FLUTTER
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment