Search in sources :

Example 1 with BsonFactory

use of de.undercouch.bson4jackson.BsonFactory in project jvm-serializers by eishay.

the class JacksonBsonDatabind method register.

public static void register(TestGroups groups) {
    JsonFactory f = new BsonFactory();
    ObjectMapper mapper = new ObjectMapper(f);
    mapper.registerModule(new BsonModule());
    groups.media.add(JavaBuiltIn.mediaTransformer, new DataBindBase<MediaContent>("bson/jackson/databind", MediaContent.class, mapper), new SerFeatures(SerFormat.BIN_CROSSLANG, SerGraph.FLAT_TREE, SerClass.CLASSES_KNOWN, ""));
}
Also used : BsonModule(de.undercouch.bson4jackson.BsonModule) MediaContent(data.media.MediaContent) BsonFactory(de.undercouch.bson4jackson.BsonFactory)

Aggregations

MediaContent (data.media.MediaContent)1 BsonFactory (de.undercouch.bson4jackson.BsonFactory)1 BsonModule (de.undercouch.bson4jackson.BsonModule)1