public class JSON extends Object implements javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>
| Constructor and Description |
|---|
JSON() |
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.ObjectMapper |
getContext(Class<?> type) |
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Returns the current object mapper used for JSON serialization/deserialization.
|
void |
setDateFormat(DateFormat dateFormat)
Set the date format for JSON (de)serialization with Date properties.
|
JSON |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) |
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Note: If you make changes to the object mapper, remember to set it back via
setObjectMapper in order to trigger HTTP client rebuilding.
public JSON setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
public void setDateFormat(DateFormat dateFormat)
dateFormat - Date formatpublic com.fasterxml.jackson.databind.ObjectMapper getContext(Class<?> type)
getContext in interface javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>Copyright © 2020. All rights reserved.