https://grokonez.com/kotlin/kotlin-convert-object-tofrom-json-jackson-2-x
Kotlin – Convert Object to/from JSON with Jackson 2.x
This tutorial shows you how to use Jackson 2.x to convert Kotlin object to/from JSON.
Person(name:String,age:Int,messages:List)
Kotlin Object, then convert Person
object to JSON string/JSON file.
<dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib</artifactId> <version>1.1.2</version> </dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
<version>2.8.8</version>
</dependency>
com.fasterxml.jackson.module.kotlin.*
More at:
https://grokonez.com/kotlin/kotlin-convert-object-tofrom-json-jackson-2-x
#kotlin #json #jackson