Example usage for com.fasterxml.jackson.databind ObjectMapper version

List of usage examples for com.fasterxml.jackson.databind ObjectMapper version

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind ObjectMapper version.

Prototype

@Override
public Version version() 

Source Link

Document

Method that will return version information stored in and read from jar that contains this class.

Usage

From source file:io.coala.json.JsonUtil.java

/**
 * @param instance//from  w ww  .  j a va  2 s. c om
 */
public synchronized static void initialize(final ObjectMapper om) {
    om.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);

    final Module[] modules = { new JodaModule(), new UUIDModule(), new JavaTimeModule() };
    om.registerModules(modules);
    LOG.trace("Using jackson v: {} with modules: {}", om.version(),
            Arrays.asList(modules).stream().map(m -> m.getModuleName()).collect(Collectors.toList()));
}