Hi Anthony,

I see that com.fasterxml.jackson.jaxrs.base.ProviderBase, from which 
org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider is 
indirectly derived, has a method

      * Method called to locate {@link ObjectMapper} to use for 
      * and deserialization. If an instance has been explicitly defined by
      * {@link #setMapper} (or non-null instance passed in constructor), 
      * will be used.
      * If not, will try to locate it using standard JAX-RS
      * <code>ContextResolver</code> mechanism, if it has been properly 
      * to access it (by JAX-RS runtime).
      * Finally, if no mapper is found, will return a default unconfigured
      * {@link ObjectMapper} instance (one constructed with default 
      * and not modified in any way)
      * @param type Class of object being serialized or deserialized;
      *   not checked at this point, since it is assumed that unprocessable
      *   classes have been already weeded out,
      *   but will be passed to <code>ContextResolver</code> as is.
      * @param mediaType Declared media type for the instance to process:
      *   not used by this method,
      *   but will be passed to <code>ContextResolver</code> as is.
     public MAPPER locateMapper(Class<?> type, MediaType mediaType);

So, for example, you could try

          ResteasyJackson2Provider provider = new 
          ObjectMapper mapper = provider.locateMapper(Object.class, 

in a resource method. Does that work for you?


Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Resteasy-users mailing list

Reply via email to