RE: Re: Restlet, jackson and @JsonTypeInfo

2014-01-27 Thread Jon Finanger
I'm trying to figure out how to get the android client to automatically convert the representation into the correct Objecttype without using mapper.convertValue(...) When looking at the representation sent from the server i see that the type information is not present.

Re: Re: Restlet, jackson and @JsonTypeInfo

2014-01-27 Thread Tim Peierls
What arguments are you passing to @JsonTypeInfo? On Mon, Jan 27, 2014 at 6:57 AM, Jon Finanger j...@finanger.no wrote: I'm trying to figure out how to get the android client to automatically convert the representation into the correct Objecttype without using mapper.convertValue(...) When

RE: Restlet, jackson and @JsonTypeInfo

2014-01-07 Thread Jon Finanger
I was able to convert the LinkedHashMap values to ArrayListT using the ObjectMapper in my clientcode: ObjectMapper mapper = jacksonConverter.getObjectMapper(); ArrayListSiteDAO sites = mapper.convertValue(tmp, new TypeReferenceArrayListSiteDAO()

Re: Restlet, jackson and @JsonTypeInfo

2014-01-07 Thread Tim Peierls
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 ArrayListSiteDAO (or

Re: Restlet, jackson and @JsonTypeInfo

2014-01-07 Thread Thierry Boileau
Hello, I think that the following will also work: @Get public ArrayListSiteDAO myGet() { ... } Best regards, Thierry Boileau 2014/1/7 Tim Peierls t...@peierls.net One problem is that the generic type formal parameter T doesn't convey enough information for the annotation-based code to