Looks interesting. The question is: If it is written into the MyPojo class,
it should be part of the JAXB spec instead? Or thinking in the other
direction: If it is not part of JAXB but part of JAX-RS then it should not
be put at the POJO class but at the method and not name it @Unmarshaller but
@Provider(MyMessageBodyReader.class)?
> -----Original Message-----
> From: Bill Burke [mailto:bburke_at_redhat.com]
> Sent: Freitag, 22. April 2011 18:42
> To: jsr339-experts_at_jax-rs-spec.java.net
> Subject: [jsr339-experts] @Marshaller
>
> A user just suggested this feature. Allow a @Marshaller and
> @Unmarshaller annotation on a POJO that identifies a reader or writer
> that should be used:
>
> i.e.
> @Unmarshaller(MyPojoReader.class)
> public class MyPojo {}
>
>
> ...
>
> @Path
> public class MyService {
>
> @GET
> MyPojo getPojo() {...}
> }
>
> Thought it might be interesting to consider.
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com