toSerializer
//ellmental/com.theagilemonkeys.ellmental.core.api/toSerializer
toSerializer
fun <T : Any> KClass<T>.toSerializer(): KSerializer<T>
Serialization utility for allowing to get the serializer of a class.
You can use it like
val outputSerializer = handler.outputType.toSerializer() val jsonString = Json.encodeToString(outputSerializer, outputObject)