Hello,

I think that the following will also work:
@Get
public ArrayList<SiteDAO> myGet() {
...
}

Best regards,
Thierry Boileau


2014/1/7 Tim Peierls <[email protected]>

> One problem is that the generic type formal parameter T doesn't convey
> enough information for the annotation-based code to reconstruct the correct
> result type. Try creating a type that embeds the actual value of the type
> parameter, e.g., SiteDaoArrayList extends ArrayList<SiteDAO> (or
> SiteDaoArrayList contains List<SiteDAO>), and using that type as the return
> type of the @Get-annotated method.
>
> --tim
>
>
> On Tue, Jan 7, 2014 at 7:28 AM, Jon Finanger <[email protected]> wrote:
>
>> I was able to convert the LinkedHashMap values to ArrayList<T> using the
>> ObjectMapper in my clientcode:
>>                         ObjectMapper mapper =
>> jacksonConverter.getObjectMapper();
>>                         ArrayList<SiteDAO> sites =
>> mapper.convertValue(tmp, new TypeReference<ArrayList<SiteDAO>>() {});
>>
>> But getting this with a simple annotation i'm not able to figure out yet.
>>
>> ------------------------------------------------------
>>
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3071291
>>
>
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3071308

Reply via email to