public class JsonBindingFeature extends Object implements javax.ws.rs.core.Feature
The Feature is automatically enabled when JsonBindingAutoDiscoverable
is on classpath.
Default JSON-B configuration obtained by calling JsonbBuilder.create()
is used.
Custom configuration, if required, can be achieved by implementing custom ContextResolver
and
registering it as a provider into JAX-RS runtime:
@Provider @class JsonbContextResolver implements ContextResolver<Jsonb> { @Override public Jsonb getContext(Class> type) { JsonbConfig config = new JsonbConfig(); // add custom configuration return JsonbBuilder.create(config); } }
Constructor and Description |
---|
JsonBindingFeature() |
Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.