I have a class Dto that will set a value with LocalDateTime
as Data Type.
I get an error when receiving a JSON.
public class Dto {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private LocalDateTime scheduledStartTime;
}
}
Here is the error:
Cannot construct instance of `java.time.LocalDateTime` (no Creators, like default construct, exist): no String-argument constructor/factory method to deserialize from String value ('2019-08-01T15:30:00Z')