Class KotlinSerializationJsonHttpMessageConverter

All Implemented Interfaces:
HttpMessageConverter<Object>, SmartHttpMessageConverter<Object>

public class KotlinSerializationJsonHttpMessageConverter extends KotlinSerializationStringHttpMessageConverter<kotlinx.serialization.json.Json>
Implementation of HttpMessageConverter that can read and write JSON using kotlinx.serialization.

This converter can be used to bind @Serializable Kotlin classes, open polymorphic serialization is not supported. It supports application/json and application/*+json with various character sets, UTF-8 being the default.

Since:
5.3
Author:
Andreas Ahlenstorf, Sebastien Deleuze, Juergen Hoeller, Iain Henderson
  • Constructor Details

    • KotlinSerializationJsonHttpMessageConverter

      public KotlinSerializationJsonHttpMessageConverter()
      Construct a new KotlinSerializationJsonHttpMessageConverter with the default configuration.
    • KotlinSerializationJsonHttpMessageConverter

      public KotlinSerializationJsonHttpMessageConverter(kotlinx.serialization.json.Json json)
      Construct a new KotlinSerializationJsonHttpMessageConverter with a custom configuration.