<!channel>: 2.6.3-2 of Jackson Kotlin Module relea...
# jackson-kotlin
a
<!channel>: 2.6.3-2 of Jackson Kotlin Module released, all generics inferred via extension functions will create an internal TypeReference instead of an erased class. So that you can just specify a shorter:
Copy code
val myList: List<MyData> = JSON.readValue(jsonStr)
or
Copy code
val myList = JSON.readValue<List<MyData>>(jsonStr)
and a full example:
Copy code
import com.fasterxml.jackson.module.kotlin.readValue

data class MyData(val a: String, val b: Int)
val JSON = jacksonObjectMapper()  

val jsonStr = """[{"a": "value1", "b": 1}, {"a": "value2", "b": 2}]"""
val myList: List<MyData> = JSON.readValue(jsonStr)
no
Class<T>
parameter is required. This release is on maven central, although may not appear in maven search engines for a few hours it is still useable from maven/gradle et al.