I am trying to de-serialize date attribute in json of format "2018-05-27" using Gson. I want date to be in LocalDate format after de-serialization.
For json input :
{ "id" : 1, "name" : "test", "startDate" : "2018-01-01", "endDate" : "2018-01-05", }
I am getting error for startDate and endDate :
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING