realmSerializerModule

fun realmSerializerModule(schema: Set<KClass<out BaseRealmObject>>): SerializersModule

Creates SerializersModule with MongoDB API compliant serializers for all the realm objects (RealmObject, EmbeddedRealmObject and AsymmetricRealmObject) in the given schema.

The target types of links in mixed fields cannot be derived from the schema definition of the realm objects. To be able to deserialize and create the correct instance of links in mixed fields, all serializers needs to know of the full set of realm objects. This means that the serializer module must be constructed with knowledge of all references classes in the schema.