Package org.glassfish.jersey.jsonb
Class JsonBindingFeature
- java.lang.Object
-
- org.glassfish.jersey.jsonb.JsonBindingFeature
-
- All Implemented Interfaces:
Feature
public class JsonBindingFeature extends Object implements Feature
Feature used to register JSON-B providers.The Feature is automatically enabled when
JsonBindingAutoDiscoverableis on classpath. Default JSON-B configuration obtained by callingJsonbBuilder.create()is used.Custom configuration, if required, can be achieved by implementing custom
ContextResolverand 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); } }- Author:
- Adam Lindenthal
-
-
Constructor Summary
Constructors Constructor Description JsonBindingFeature()
-
-
-
Method Detail
-
configure
public boolean configure(FeatureContext context)
-
-