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
Big Chungus
11/18/2021, 8:24 AM
Yes, via custom serializer that does some runtime assertions and delegates to other serializers. Alternatively you could serialize to JsonObject instead