I am trying to retrieve a list of objects via Retrofit:
public interface TemplateApi {
@GET("/api/templates")
Observable<List<TemplateDto>> getList();
}
Here the Dto:
public class TemplateDto {
public String id;
public String name;
@Override
public String toString() {
return this.name;
}
}
Instead of the expected List I get a
List<LinkedTreeMap>
which leads to weird side effects (in my case toString() returns not what I would expect)