How to swap Spring Boot mapper from Jackson to kotlinx.serialization

Viewed 1596

I would like my Spring Boot project to use kotlinx.serialization. I can't figure out how to swap the mapper correctly... If I wanted to use GSON, I could just note it in the props via spring.http.converters.preferred-json-mapper=gson.

Has anyone had success with this?

1 Answers

Just use Spring >= 5.3 and add corresponding kotlin plugin and serialization dependency. Spring switches serialization automatically. Details

Related