use of serializers.SerFeatures in project jvm-serializers by eishay.
the class JacksonWithAfterburner method registerSmile.
public static void registerSmile(TestGroups groups, boolean shareNames, boolean shareValues) {
SmileFactory f = new SmileFactory();
f.configure(SmileGenerator.Feature.CHECK_SHARED_NAMES, shareNames);
f.configure(SmileGenerator.Feature.CHECK_SHARED_STRING_VALUES, shareValues);
ObjectMapper smileMapper = new ObjectMapper(f);
smileMapper.registerModule(new AfterburnerModule());
groups.media.add(JavaBuiltIn.mediaTransformer, new StdJacksonDataBind<MediaContent>("smile/jackson+afterburner/databind", MediaContent.class, smileMapper), new SerFeatures(SerFormat.BINARY, SerGraph.FLAT_TREE, SerClass.ZERO_KNOWLEDGE, STD_DESC));
}
use of serializers.SerFeatures in project jvm-serializers by eishay.
the class Wobly method register.
public static void register(TestGroups groups) {
groups.media.add(new WoblySimpleUtils.WoblyTransformer(), new WoblySimpleUtils.WoblySerializer(), new SerFeatures(SerFormat.BINARY, SerGraph.FLAT_TREE, SerClass.MANUAL_OPT, ""));
groups.media.add(new WoblyCompactUtils.WoblyTransformer(), new WoblyCompactUtils.WoblySerializer(), new SerFeatures(SerFormat.BINARY, SerGraph.FLAT_TREE, SerClass.MANUAL_OPT, ""));
}
Aggregations