@Produces(value="application/json") public class GsonContextResolver extends Object implements javax.ws.rs.ext.ContextResolver<com.google.gson.Gson>
ContextResolver to replace default GsonBuilder for Gson marshalling using a builder with
PropertyBox handling capabilities.| Constructor and Description |
|---|
GsonContextResolver(boolean prettyPrint)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gson.Gson |
getContext(Class<?> type) |
public GsonContextResolver(boolean prettyPrint)
prettyPrint - true to enable pretty printing for serialized JSONpublic com.google.gson.Gson getContext(Class<?> type)
getContext in interface javax.ws.rs.ext.ContextResolver<com.google.gson.Gson>Copyright © 2019 The Holon Platform. All rights reserved.