import org.codehaus.jackson.map.module.SimpleModule;
public class IMetricSerializer {
public ObjectMapper getObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
SimpleModule metricModule = new SimpleModule("IMetricSerializerModule", new Version(1, 0, 0, null));
metricModule.setMixInAnnotation(IMetric.class, IMetricMixin.class);
metricModule.setMixInAnnotation(Locator.class, LocatorMixin.class);
metricModule.setMixInAnnotation(PreaggregatedMetric.class, PreaggMetricMixin.class);
metricModule.setMixInAnnotation(Rollup.class, RollupMixin.class);