Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class GenericEnumJsonAdapter<T> : JsonAdapter<T>() {
@FromJson
override fun fromJson(reader: JsonReader): T? {
// Cannot access enumValues<T>()
}
@ToJson
override fun toJson(writer: JsonWriter, value: T?) {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment