List of usage examples for com.fasterxml.jackson.jaxrs.cfg JaxRSFeature ALLOW_EMPTY_INPUT
JaxRSFeature ALLOW_EMPTY_INPUT
To view the source code for com.fasterxml.jackson.jaxrs.cfg JaxRSFeature ALLOW_EMPTY_INPUT.
Click Source Link
From source file:com.ibm.watson.it.test.harness.TestHarnessApplication.java
@Override public Set<Object> getSingletons() { Set<Object> s = new HashSet<Object>(); // Register the Jackson provider for JSON JacksonJaxbJsonProvider jaxbProvider = new JacksonJaxbJsonProvider(); jaxbProvider.enable(JaxRSFeature.ALLOW_EMPTY_INPUT); s.add(jaxbProvider);/*from ww w. j a va 2s .c o m*/ return s; }
From source file:com.unboundid.scim2.server.EndpointTestCase.java
/** * {@inheritDoc}/* w w w .j a v a2 s. c o m*/ */ @Override protected Application configure() { ResourceConfig config = new ResourceConfig(); // Exception Mappers config.register(ScimExceptionMapper.class); config.register(RuntimeExceptionMapper.class); config.register(JsonProcessingExceptionMapper.class); JacksonJsonProvider provider = new JacksonJsonProvider(JsonUtils.createObjectMapper()); provider.configure(JaxRSFeature.ALLOW_EMPTY_INPUT, false); config.register(provider); // Filters config.register(DotSearchFilter.class); config.register(TestAuthenticatedSubjectAliasFilter.class); config.register(DefaultContentTypeFilter.class); requestFilter = new TestRequestFilter(); config.register(requestFilter); // Standard endpoints config.register(ResourceTypesEndpoint.class); config.register(CustomContentEndpoint.class); config.register(SchemasEndpoint.class); config.register(TestServiceProviderConfigEndpoint.class); config.register(TestResourceEndpoint.class); config.register(new TestSingletonResourceEndpoint()); return config; }