cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craigrs84 <cschu...@kellerschroeder.com>
Subject Can't Get Jackson jaxrs:providers Working!!!
Date Tue, 18 Aug 2015 19:40:50 GMT
I have the following setup, I'm trying to use Jackson Json provider with
custom settings applied.

However whenever I connect to my service the customizations are NOT applied. 
For example it still wraps the root element and doesn't indent the JSON. 
(see code below for explanation)

I'm getting desperate, please respond with advice.  Thanks.


<jaxrs:server id="textingService" address="/texting">
        
        <jaxrs:serviceBeans>
        	<bean class="com.vectren.ws.rest.TextingService"/>
        </jaxrs:serviceBeans>
        
		<jaxrs:providers>
			<ref bean="jsonProvider"/>
			<ref bean="jaxbJsonProvider"/>
		</jaxrs:providers>
		
</jaxrs:server>

public class CustomJsonProvider extends
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
{
	public CustomJsonProvider()
    {
    	super();
    	super.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
    	super.configure(SerializationFeature.INDENT_OUTPUT, true);
    }
}




--
View this message in context: http://cxf.547215.n5.nabble.com/Can-t-Get-Jackson-jaxrs-providers-Working-tp5760269.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Mime
View raw message