0

The external class I am using: https://github.com/arrow-kt/arrow/blob/5e0db6b7aaeb1ac99ecbfff74f03cce28e234391/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Either.kt#L725

Either Sealed class from Arrow.Core library.

This is my custom serializer for Either

@Serializer(forClass = arrow.core.Either::class)
object EitherSerializer : KSerializer<Either<ErrorResponse, SuccessResponse>> {

With this setup, I am expecting Springboot to use Kotlin serializer instead of jackson2. own class Kotlin serializers(using @Serializable) is recognized by the Kotlin runtime and it's using KotlinSerializationJsonHttpMessageConverter but in the above case, (using @Serialzer) default Jackson HTTP message converter is invoked.

Subhod I
  • 172
  • 2
  • 7

0 Answers0