All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.aequologica.neo.serioulizer.jaxrs.ObjectMapperProvider Maven / Gradle / Ivy

The newest version!
package net.aequologica.neo.serioulizer.jaxrs;

import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
import net.aequologica.neo.serioulizer.jackson.AbstractReaderWriter;

@Provider
public class ObjectMapperProvider extends JacksonJsonProvider implements ContextResolver {

    final ObjectMapper defaultObjectMapper;

    public ObjectMapperProvider() {
        defaultObjectMapper = AbstractReaderWriter.createMapper();
    }

    @Override
    public ObjectMapper getContext(Class type) {
        return defaultObjectMapper;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy