I am hoping to get some help debugging this problem. If I send the following JSON to my backend it works correctly:
{
"approvalRequired": false,
"location": {
"locationName": "<+37.33233141,-122.03121860> +\/- 5.00m (speed 0.00 mps \/ course -1.00) @ 9\/16\/18, 9:24:59 PM Pacific Daylight Time",
"longitude": -122.0312186,
"latitude": 37.332331410000002
}
}
However, if I now send the following:
{
"approvalRequired": false,
"scheduledStartTime": "2016-01-01T10:24:00+01:00",
"location": {
"locationName": "<+37.33233141,-122.03121860> +\/- 5.00m (speed 0.00 mps \/ course -1.00) @ 9\/16\/18, 9:24:59 PM Pacific Daylight Time",
"longitude": -122.0312186,
"latitude": 37.332331410000002
}
}
I get the above error. In my backend code I have the following:
@DynamoDBTypeConverted(converter = ZonedDateTimeTypeConverter.class)
@DynamoDBAttribute(attributeName = "scheduledStartTime")
public ZonedDateTime scheduledStartTime;
And the API method signature looks like this:
@RequestMapping(method = RequestMethod.POST)
public ResponseEntity create(@RequestBody Event event) {...}
I believe the problem I am having is that the JSON cannot be parsed to ZonedDateTime. Does anyone have advice as to either, (1) what time of json string format ZonedDateTime automatically accepts or (2) how to make a DTO to parse zoned date time?
Thanks!