I currently have this POJO on my REST server.
public class IntervalHolder {
private final LocalTime start;
private final LocalTime end;
}
This IntervalHolder class is also returned as a property in a larger object:
public class Foo {
private final List<IntervalHolder> intervals;
}
I've already debugged my server output, and my LocalTime values are correct, but when I consume them on my Android App, the values come out wrong. The automatic parsing seems to be incorrect.
I'm using Retrofit in my app:
@GET("foo")
Call<List<Foo>> foo();
My REST endpoint:
@Path("/foo")
public class Foo{
@Path("/")
@GET
@Produces("application/json; charset=UTF-8")
public List<Foo> listAll() {
//return ArrayList<Foo>
}
}
I've read several answer in which I'm supposed to build a converter, but they only approach cases where the actual type returned IS in fact a LocalTime (or DateTime, etc). But that is not my case.
I want to be able to properly parse a property inside my object. Every single other property in my object seems to be fine.
I'm probably missing something very obvious here. Any help would be greatly appreciated! Thanks in advance!