I need to know how to override the default JSON Provider on a WebSphere Application Server Environment (versions 8.0 and 8.5). I need to do that due a to an issue found on Jackson library version 1.6 (https://github.com/FasterXML/jackson-module-jaxb-annotations/issues/3).
If anyone could help would be more than welcome.
I did not quite get whether you want to avoid using Jackson at all or you just want a different version.
In your application you can register the providers you want. For example, to use Jettison you need the following:
import org.apache.wink.providers.jettison.JettisonJAXBProvider;
import javax.ws.rs.core.Application;
import java.util.HashSet;
import java.util.Set;
public class YourApplication extends Application {
@Override
public Set<Object> getSingletons() {
Set<Object> singletons = new HashSet<Object>();
JettisonJAXBProvider jaxbProvider = new JettisonJAXBProvider();
singletons.add(jaxbProvider);
return singletons;
}
}
If you need different Jackson version, why not just put it into WEB-INF/lib and set web module classloading policy to PARENT_LAST?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With