Hey, Has anyone tried to serialize Map<String, ...
# multiplatform
n
Hey, Has anyone tried to serialize Map<String, Any> ?
g
On which platforms? What's your problem?
n
I am using kotlinx.serialization to serialize Map<String, Any>. But its showing Serializer has. not been found for type ‘Any’
g
You may want to check #serialization
Also your error message makes sense, I presume serializer cannot be determined magically, and using reflection may not be the best cross-platform approach (giving it's not available on all platforms afaik).
h
Depending on your use case (internal/external serialization) and the number of classes I would prefer to use sealed classes.