Example usage for com.fasterxml.jackson.core Version Version

List of usage examples for com.fasterxml.jackson.core Version Version

Introduction

In this page you can find the example usage for com.fasterxml.jackson.core Version Version.

Prototype

public Version(int major, int minor, int patchLevel, String snapshotInfo, String groupId, String artifactId) 

Source Link

Usage

From source file:org.phenotips.data.rest.internal.DefaultPatientsFetchResourceImpl.java

/**
 * A custom object mapper to facilitate serializing a list of {@link Patient} objects.
 *
 * @return an object mapper that can serialize {@link Patient} objects
 *///ww  w.  ja v a  2  s. c  o m
private ObjectMapper getCustomObjectMapper() {
    final ObjectMapper mapper = new ObjectMapper();
    SimpleModule m = new SimpleModule("PrimaryEntitySerializer",
            new Version(1, 0, 0, "", "org.phenotips", "PatientReferenceSerializer"));
    m.addSerializer(PrimaryEntity.class, new PrimaryEntitySerializer());
    mapper.registerModule(m);
    return mapper;
}

From source file:org.talend.dataprep.api.preparation.json.MixedContentMapModule.java

/**
 * Default empty constructor.//from  w w w . j av a 2 s.c  om
 */
public MixedContentMapModule() {
    super(MixedContentMapModule.class.getName(), new Version(1, 0, 0, null, null, null));
    addSerializer(MixedContentMap.class, new Serializer());
    addDeserializer(MixedContentMap.class, new Deserializer());
}