import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
data class InsideList(
@JsonProperty("price") val price: String,
@JsonProperty("product") val product: String
)
data class NList(
@JsonProperty("listexample") val listexample: List<InsideList>?
)
the
response
is the json list
Copy code
val jsonResponse = MapperUtility.jsonMapper.readValue<NList>(response)
println("Response : {${jsonResponse.listexample}}")