christophsturm
12/12/2023, 8:18 AMpackage util
class JsonFetcher() {
...
suspend fun <T> get(url: String, cls: TypeReference<T>): T {
return mapper.readValue(diskCacheHttpClient.get(url), cls)
}
}
suspend inline fun <reified T> JsonFetcher.get(content: String): T = get(content, jacksonTypeRef<T>())
but when I import the helper method I have to import util.get
so its unclear that its the get method of JsonFetcher. is there a way to improve this?efemoney
12/12/2023, 8:55 AMchristophsturm
12/12/2023, 8:57 AM