Is there a way to serialize an object where the ty...
# serialization
s
Is there a way to serialize an object where the type isn’t known at compile time? I’m getting this exception on Kotlin Native -
kotlinx.serialization.SerializationException: Serializer for class 'Any' is not found.
b
Yes, via custom serializer that does some runtime assertions and delegates to other serializers. Alternatively you could serialize to JsonObject instead