C
C#6mo ago
PAN1K

Json Serializer implicit conversion

I'm trying to implement a GetAsync<T>(CacheKey key) method for Redis. The issue is that when T is string the method can't deserialize the value to string, as the value is already a string. I can do an if check for string type but I wonder if there is another way
2 Replies
Joschi
Joschi6mo ago
What's bad about checking for strings?
PAN1K
PAN1K6mo ago
I feel like it's not good approach for a generic method implementation