users@jersey.java.net

Re: [Jersey] Java generics with Jersey

From: Damiano ALBANI <damiano.albani_at_univ-nantes.fr>
Date: Thu, 07 Oct 2010 18:46:29 +0200

On Thu, 2010-10-07 at 18:02 +0200, Damiano ALBANI wrote:

> > When the JAXB context is instantiated all it knows about is
> > ExtJsWrapper.class and Campagne.class, it knows nothing about the Java
> > type ExtJsWrapper<Campagne> even though Jersey does.
> >
> > So when JAXB is asked to unmarshal ExtJsWrapper.class it sees, using
> > reflection, the field "rows" as the class Object.

> Anyway, adding a "type" property is not so troublesome after all.

In fact, I might have been a bit too confident here :-)
Because putting the "type" property as the very first one in a JSON
serialization is not an easy thing to do in the various JavaScript
frameworks -- in my case ExtJS.
Looks like a small requirement but can be hard to implement...

-- 
Damiano ALBANI