Search in sources :

Example 1 with CmsSystemCodeSerializer

use of gov.ca.cwds.data.CmsSystemCodeSerializer 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)1 SimpleModule (com.fasterxml.jackson.databind.module.SimpleModule)1 CmsSystemCodeSerializer (gov.ca.cwds.data.CmsSystemCodeSerializer)1