Search in sources :

Example 6 with SerFeatures

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));
}
Also used : AfterburnerModule(com.fasterxml.jackson.module.afterburner.AfterburnerModule) SmileFactory(com.fasterxml.jackson.dataformat.smile.SmileFactory) MediaContent(data.media.MediaContent) SerFeatures(serializers.SerFeatures) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 7 with SerFeatures

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, ""));
}
Also used : WoblyCompactUtils(serializers.wobly.compact.WoblyCompactUtils) WoblySimpleUtils(serializers.wobly.simple.WoblySimpleUtils) SerFeatures(serializers.SerFeatures)

Aggregations

SerFeatures (serializers.SerFeatures)7 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 MediaContent (data.media.MediaContent)4 AfterburnerModule (com.fasterxml.jackson.module.afterburner.AfterburnerModule)3 JsonFactory (com.fasterxml.jackson.core.JsonFactory)1 CBORFactory (com.fasterxml.jackson.dataformat.cbor.CBORFactory)1 SmileFactory (com.fasterxml.jackson.dataformat.smile.SmileFactory)1 WoblyCompactUtils (serializers.wobly.compact.WoblyCompactUtils)1 WoblySimpleUtils (serializers.wobly.simple.WoblySimpleUtils)1