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

io.github.pmckeown.dependencytrack.ObjectMapperFactory Maven / Gradle / Ivy

Go to download

Maven plugin to integrate with a Dependency Track server to submit dependency manifests and gather project metrics.

There is a newer version: 1.7.0
Show newest version
package io.github.pmckeown.dependencytrack;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * Utility class to build {@link ObjectMapper} instances to be passed to Unirest
 *
 * @author Paul McKeown
 */
public class ObjectMapperFactory {

    private ObjectMapperFactory() {
        // Use factory method
    }

    /**
     * Get an {@link ObjectMapper} instance that is configured to
     * @return a preconfigured ObjectMapper
     */
    public static ObjectMapper relaxedObjectMapper() {
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        return objectMapper;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy