Created
November 17, 2022 10:24
-
-
Save steliosfran/b424bae2b7b8ad750c7921624a415b35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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