Hi
On 06/03/13 17:04, dchen wrote:
Hi,

We use CXF osgi bundle version 2.7.2 to expose all REST service and we set
JacksonJsonProvider as CXF RS Provider as following:

  attMap.put("org.apache.cxf.rs.provider", //$NON-NLS-1$
                 "org.codehaus.jackson.jaxrs.JacksonJsonProvider");
//$NON-NLS-1$


I think you should be able to pass an instance of JacksonJsonProvider as "org.apache.cxf.rs.provider", this will let you pre-configure it as needed

HTH, Sergey

  ...
  initiatingBundle.getBundleContext().registerService(interfaces,
serviceObject,
                 convertMapToDictionary(initiatingBundle.getBundleContext(),
attMap));


So we question is if there a way to pass in the JacksonJsonProvider object
instead if String, or if there is other way for me to set the
Feature.UNWRAP_ROOT_VALUE in the ObjectMapper as following:

ObjectMapper om = new ObjectMapper();
om.configure(Feature.UNWRAP_ROOT_VALUE, true);

Thanks,
Dave



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Set-Feature-properties-in-JacksonJsonProvider-s-ObjectMapper-tp5724136.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to