Comments (2)
You can use ContextResolver<Gson>
to configure GSON.
Something like:
public static class GsonContextResolver implements ContextResolver<Gson> {
@Override
public Gson getContext(Class<?> type) {
GsonBuilder builder = new GsonBuilder();
builder.set...
return builder.create();
}
}
Then do not forget to register the GsonContextResolver
to the ResourceConfig
/Application
.
from jersey.
oh okay, thank you very much
from jersey.
Related Issues (20)
- Remove `Content-Length` header when encoding response content
- Did Jersey 3.1.4 remove support for JDK 11? HOT 3
- REST Client causes out of memory even if close is called. HOT 7
- 3.1.4 broken release, JettyConnectorProvider always throws exception HOT 2
- Shall we start a 4.0 branch? HOT 8
- Getting rid of `new File(URL.getPath()).toURI()` HOT 3
- @Context annotation declaration of HttpServletReqeuest object in parent reference is passing the first time API hit values to the resource always HOT 3
- Unbounded memory use of LRUMap due to removed access synchronization in ProviderBase HOT 6
- How to disable JaxRSFeature.READ_FULL_STREAM? HOT 2
- jersey-netty-connector: response body not processed when content-length/transfer-encoding headers are not present
- jersey-media-json-binding 3.0.12 has two impls of parsson on classpath
- InjectionManagerFactory not found in OSGi http service with Declarative service HOT 3
- 2.x/examples/osgi-helloworld-webapp does not work with Jetty 12 but with Jetty 10 HOT 12
- Connectivity issues masked by ProcessingException: Already connected HOT 1
- IllegalAccessException in jersey-client-proxy when `@BeanParam` annotated class contains private fields
- ServletContext is invalid in MessageBodyWriter if handling async CompletionStage HOT 3
- Headers modified by MultiPartWriter are not sent HOT 2
- HttpUrlConnector and JettyConnector doesn't log the headers modified by MultiPartWriter HOT 2
- [Micrometer] suport for the @Counted annotation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jersey.