C
C#12mo 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
Joschi12mo ago
What's bad about checking for strings?
PAN1K
PAN1KOP12mo ago
I feel like it's not good approach for a generic method implementation
Want results from more Discord servers?
Add your server