com.safelayer.rap.json.ObjectMapperContextResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pki-connector-restapi Show documentation
Show all versions of pki-connector-restapi Show documentation
The PKI Connector RESTAPI is a library that helps developing new PKI Connectors for TrustedX
The newest version!
package com.safelayer.rap.json;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;
import com.fasterxml.jackson.databind.ObjectMapper;
@Provider
public class ObjectMapperContextResolver implements ContextResolver {
private ObjectMapper objectMapper;
public ObjectMapperContextResolver() throws Exception {
objectMapper = ObjectMapperFactory.getInstance().getObjectMapper();
}
@Override
public ObjectMapper getContext(Class> objectType) {
return objectMapper;
}
}