Adding Jackson for Kotlin

We need to add Jackson for Kotlin dependencies for Maven projects. In fact, we need a Kotlin standard library on our pom.xml. Also, we need to put jackson-module-kotlin, it allows us to work with JSON on Kotlin, there are some differences from Java in these parts.

This part is pretty simple, and we will add these following dependencies in the dependencies sections in pom.xml. The dependencies are as follows:

<dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-kotlin</artifactId> <version>${jackson.version}</version></dependency>

Now, we have the dependencies configured, and we can set the plugins to compile the Kotlin source code. In the next section, we will do that.

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.