@Override public Version version() { return new Version(1, 0, 0, "", "org.stagemonitor", "stagemonitor-requestmonitor"); }
@Override public Version version() { return new Version(1, 0, 0, "", "org.stagemonitor", "stagemonitor-core"); }
@Override public Version version() { return new Version(0, 1, 0, "", "com.zendesk", "maxwell"); }
public CasJackson2Module() { super(CasJackson2Module.class.getName(), new Version(1, 0, 0, null, null, null)); }
public CoreJackson2Module() { super(CoreJackson2Module.class.getName(), new Version(1, 0, 0, null, null, null)); }
public CoreJackson2Module() { super(CoreJackson2Module.class.getName(), new Version(1, 0, 0, null, null, null)); }
@Override public List<Module> getModules() { return Collections.singletonList( new SimpleModule(HyperLogLogPlusJsonConstants.HYPER_LOG_LOG_PLUS_SERIALISER_MODULE_NAME, new Version(1, 0, 0, null, null, null)) .addSerializer(HyperLogLogPlus.class, new HyperLogLogPlusJsonSerialiser()) .addDeserializer(HyperLogLogPlus.class, new HyperLogLogPlusJsonDeserialiser()) ); } }
@Override public List<Module> getModules() { return Collections.singletonList( new SimpleModule(RoaringBitmapConstants.BITMAP_MODULE_NAME, new Version(1, 0, 0, null, null, null)) .addSerializer(RoaringBitmap.class, new RoaringBitmapJsonSerialiser()) .addDeserializer(RoaringBitmap.class, new RoaringBitmapJsonDeserialiser()) ); } }
public static SimpleModule tuuidModule() { SimpleModule tuuidModule = new SimpleModule("TUUIDModule", new Version(1, 0, 0, null, "org.rapidoid", "rapidoid-commons")); tuuidModule.addSerializer(TUUID.class, new TUUIDSerializer()); tuuidModule.addDeserializer(TUUID.class, new TUUIDDeserializer()); return tuuidModule; }
public static SimpleModule getSerializerModule() { SimpleModule module = new SimpleModule("VertexJSONSerializer", new Version(1, 0, 0, null, "com.fasterxml.jackson.module", "jackson-module-jaxb-annotations")); module.addSerializer(new GeometrySerializer()); module.addSerializer(new CoordinateSerializer()); module.addSerializer(new PackedCoordinateSequenceSerializer()); return module; }
/** Create a module including the serializer and deserializer for local dates */ public static SimpleModule makeModule () { Version moduleVersion = new Version(1, 0, 0, null, null, null); SimpleModule module = new SimpleModule("LocalDate", moduleVersion); module.addSerializer(LocalDate.class, new JodaLocalDateSerializer()); module.addDeserializer(LocalDate.class, new JodaLocalDateDeserializer()); return module; }
/** Create a module including the serializer and deserializer for qualified mode sets */ public static SimpleModule makeModule () { Version moduleVersion = new Version(1, 0, 0, null, null, null); SimpleModule module = new SimpleModule("QualifiedModeSet", moduleVersion); module.addSerializer(QualifiedModeSet.class, new QualifiedModeSetSerializer()); module.addDeserializer(QualifiedModeSet.class, new QualifiedModeSetDeserializer()); return module; } }
/** Create a module including the serializer and deserializer for local dates */ public static SimpleModule makeModule () { Version moduleVersion = new Version(1, 0, 0, null, null, null); SimpleModule module = new SimpleModule("TraverseModeSet", moduleVersion); module.addSerializer(TraverseModeSet.class, new TraverseModeSetSerializer()); module.addDeserializer(TraverseModeSet.class, new TraverseModeSetDeserializer()); return module; }
/** * Method used by <code>PackageVersion</code> classes to decode version injected by Maven build. */ public static Version parseVersion(String s, String groupId, String artifactId) { if (s != null && (s = s.trim()).length() > 0) { String[] parts = V_SEP.split(s); return new Version(parseVersionPart(parts[0]), (parts.length > 1) ? parseVersionPart(parts[1]) : 0, (parts.length > 2) ? parseVersionPart(parts[2]) : 0, (parts.length > 3) ? parts[3] : null, groupId, artifactId); } return Version.unknownVersion(); }
/** This creates a Jackson module including both the serializer and deserializer for AgencyAndIds. */ public static SimpleModule makeModule () { Version moduleVersion = new Version(1, 0, 0, null, null, null); SimpleModule module = new SimpleModule("OTP", moduleVersion); module.addSerializer(FeedScopedId.class, new FeedScopedIdSerializer()); module.addDeserializer(FeedScopedId.class, new FeedScopedIdDeserializer()); // Map key (de)serializers are always separate from value ones, because they must be strings. module.addKeyDeserializer(FeedScopedId.class, new FeedScopedIdKeyDeserializer()); return module; }
/** * Method used by <code>PackageVersion</code> classes to decode version injected by Maven build. */ public static Version parseVersion(String s, String groupId, String artifactId) { if (s != null && (s = s.trim()).length() > 0) { String[] parts = V_SEP.split(s); return new Version(parseVersionPart(parts[0]), (parts.length > 1) ? parseVersionPart(parts[1]) : 0, (parts.length > 2) ? parseVersionPart(parts[2]) : 0, (parts.length > 3) ? parts[3] : null, groupId, artifactId); } return Version.unknownVersion(); }
public static <T> ObjectReader getObjectReader(Class<T> type) { final ObjectReader objectReader; if (getMapper().version().compareTo(new Version(2, 6, 0, null, "com.fasterxml.jackson.core", "jackson-databind")) >= 0) { objectReader = getMapper().readerFor(type); } else { objectReader = getMapper().reader(type); } return objectReader; } private static class AfterburnerModuleRegisterer {
@Before public void before() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT); final SimpleModule module = new SimpleModule(HyperLogLogPlusJsonConstants.HYPER_LOG_LOG_PLUS_SERIALISER_MODULE_NAME, new Version(1, 0, 0, null)); module.addSerializer(HyperLogLogPlus.class, new HyperLogLogPlusJsonSerialiser()); module.addDeserializer(HyperLogLogPlus.class, new HyperLogLogPlusJsonDeserialiser()); mapper.registerModule(module); }
@BeforeClass public static void initClassStubData() { mapper = new ObjectMapper(); combinedPlotSerializer = new CombinedPlotSerializer(); SimpleModule module = new SimpleModule("ChartSerializer", new Version(1, 0, 0, null)); module.addSerializer(XYChart.class, new XYChartSerializer()); module.addSerializer(CombinedPlot.class, new CombinedPlotSerializer()); mapper.registerModule(module); }
/** * Creates a new {@link org.springframework.data.elasticsearch.core.geo.CustomGeoModule} registering serializers and deserializers for spring data commons geo-spatial types. */ public CustomGeoModule() { super("Spring Data Elasticsearch Geo", new Version(1, 0, 0, null, "org.springframework.data.elasticsearch", "spring-data-elasticsearch-geo")); addSerializer(Point.class, new PointSerializer()); addDeserializer(Point.class, new PointDeserializer()); } }