users@jersey.java.net

Re: [Jersey] custom media types

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 15 Oct 2009 16:27:01 +0200

On Oct 15, 2009, at 4:19 PM, Felipe Gaścho wrote:

> following the last discussion about hateoas, how can I create custom
> MediaTypes with jersey ? any example ?

Do you mean using something like application/vnd.com.foo+xml and
application/vnd.com.foo+json ?

If so it is no different than declaring "application/xml".

What Jersey/JAX-RS cannot do is perform matching on parameters of
media types so you have to make sure all important information is in
the type or subtype of the media type.

Paul.