using this function: ``` private inline fun <re...
# announcements
b
using this function:
Copy code
private inline fun <reified T> parseFile(files: Map<String, Path>,
                                         fileName: String,
                                         mapper: ObjectMapper): Array<T> =
    files[fileName]
        ?.toFile()
        ?.readText()
        ?.let {
            mapper.readValue<Array<T>>(it)
        }
        ?: emptyArray()
It seems that the kotlin api ignores the Array parameter Cannot deserialize instance of
at.lhes.sws.locationclient.model.Division
out of START_ARRAY token at [Source: (String)"[{"id":"190","type":"Landmaschinen-Handel"}] where T is Division
ok, manually inlined it and debugged the code
had to use mapper.readValue<Array<T>>(it, mapper.typeFactory.constructArrayType(T::class.java))
instead of mapper.readValue<Array<T>>(it)