Search in sources :

Example 11 with Version

use of com.fasterxml.jackson.core.Version in project midpoint by Evolveum.

the class YamlLexicalProcessor method createSerializerModule.

private Module createSerializerModule() {
    SimpleModule module = new SimpleModule("MidpointModule", new Version(0, 0, 0, "aa"));
    module.addSerializer(QName.class, new QNameSerializer());
    module.addSerializer(PolyString.class, new PolyStringSerializer());
    module.addSerializer(ItemPath.class, new ItemPathSerializer());
    module.addSerializer(ItemPathType.class, new ItemPathTypeSerializer());
    //		module.addSerializer(JAXBElement.class, new JaxbElementSerializer());
    module.addSerializer(XMLGregorianCalendar.class, new XmlGregorianCalendarSerializer());
    module.addSerializer(Element.class, new DomElementSerializer());
    return module;
}
Also used : Version(com.fasterxml.jackson.core.Version) SimpleModule(com.fasterxml.jackson.databind.module.SimpleModule)

Example 12 with Version

use of com.fasterxml.jackson.core.Version in project API by ca-cwds.

the class ApiJsonModule method configure.

@Override
protected void configure() {
    // Register system code translator with Jackson.
    SimpleModule module = new SimpleModule("SystemCodeModule", new Version(0, 1, 0, "a", "alpha", ""));
    module.addSerializer(Short.class, new CmsSystemCodeSerializer(Guice.createInjector().getInstance(ApiSystemCodeCache.class)));
    bootstrap.getObjectMapper().registerModule(module);
}
Also used : CmsSystemCodeSerializer(gov.ca.cwds.data.CmsSystemCodeSerializer) Version(com.fasterxml.jackson.core.Version) SimpleModule(com.fasterxml.jackson.databind.module.SimpleModule)

Aggregations

Version (com.fasterxml.jackson.core.Version)12 SimpleModule (com.fasterxml.jackson.databind.module.SimpleModule)8 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 JsonFactory (com.fasterxml.jackson.core.JsonFactory)1 JsonGenerator (com.fasterxml.jackson.core.JsonGenerator)1 JsonParser (com.fasterxml.jackson.core.JsonParser)1 PackageVersion (com.fasterxml.jackson.databind.cfg.PackageVersion)1 CmsSystemCodeSerializer (gov.ca.cwds.data.CmsSystemCodeSerializer)1 IOException (java.io.IOException)1 Path (org.apache.hadoop.fs.Path)1 ID (org.apache.hadoop.mapreduce.ID)1 Before (org.junit.Before)1 Test (org.junit.Test)1 RoaringBitmap (org.roaringbitmap.RoaringBitmap)1