Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {"activities-steps":[
- {"dateTime":"2018-04-17","value":"11045"},
- {"dateTime":"2018-04-18","value":"14324"},
- {"dateTime":"2018-05-16","value":"11596"}
- ]}
- data class ActivitiesSteps(var dateTime: String, var value: String)
- val mapper = jacksonObjectMapper()
- val stepsList = mapper.readValue<List<ActivitiesSteps>>(jsonSteps)
- Exception in thread "main" com.fasterxml.jackson.databind.exc.MismatchedInputException:
- Cannot deserialize instance of `java.util.ArrayList` out of
- START_OBJECT token at
- [Source: (String)"{"activities-steps":[
- {"dateTime":"2018-04-17","value":"11045"},
- {"dateTime":"2018-04-25","value":"8585"},
- {"dateTime":"2018-04-26","value":"11218"},
- {"dateTime":"2018-04-27","value":"10462"},
- {"dateTime":"2018-04"[truncated 762 chars]; line: 1, column: 1]
Add Comment
Please, Sign In to add comment