napperley
04/29/2019, 10:31 PMcom.fasterxml.jackson.databind.exc.MismatchedInputException: Expected array or string.
at [Source: (StringReader); line: 5, column: 19] (through reference chain: org.example.battery_info.cli_client.BatteryInfoResult["batteryInfoList"]->java.lang.Object[][0]->org.example.battery_info.cli_client.model.http.BatteryInfo["timestamp"])
What does this error mean?napperley
04/29/2019, 10:34 PMnapperley
04/29/2019, 10:38 PMdata class BatteryInfo(
val id: Int,
val timestamp: LocalDateTime,
val channel: Int,
val battery: Battery,
val site: Int
)
data class BatteryInfoResult(val total: Int, val batteryInfoList: Array<BatteryInfo>)
napperley
04/29/2019, 10:40 PMnapperley
04/29/2019, 11:26 PMnapperley
04/29/2019, 11:27 PMnapperley
05/02/2019, 6:49 AM@JsonIgnoreProperties(ignoreUnknown = true)
data class Timestamp(
@JsonProperty("year")
val year: Int,
@JsonProperty("monthValue")
val month: Int,
@JsonProperty("dayOfMonth")
val day: Int,
@JsonProperty("hour")
val hour: Int,
@JsonProperty("minute")
val minute: Int
)