Does anyone know if its possible to use the conten...
# ktor
j
Does anyone know if its possible to use the content negotiation's serialization configuration in a Websocket handler? Specifically, I have a Content Negotiation config like:
Copy code
install(ContentNegotiation) {
     // JSON Config
     json(Json(JsonConfiguration.Default.copy(encodeDefaults = false, classDiscriminator = "class"),
          apiModelSerializerModule), ContentType.Application.Json)
     // CBOR Config
     serialization(ContentType.Application.Cbor, Cbor(encodeDefaults = false, context = apiModelSerializerModule))
     // Protobuf Config
     serialization(ContentType.Application.ProtoBuf, ProtoBuf(encodeDefaults = false,
          context = apiModelSerializerModule))
}
And I would like to automatically handle a data object that is dealt with by the
apiModelSerializerModule