The optionally provided serializer registry.
The optionally provided serializer registry.
Note that this can also be exploited to allow multiple traits to contribute to the serializer registry rather than provide one, by checking whether the super implementation also provides one, and concatenating with that if it does. To do that, the override must be a def, so that it can be subsequently overridden by other mixed in traits.
This can be used to depend on an optionally provided serializer registry.
The purpose of this is to allow Lagom to configure its actor system to use a provided serializer registry if one is provided, but not require one to be provided. It is used in combination with RequiresJsonSerializerRegistry, which for example the persistence components traits can extend to force a user to provide one, and provides that mandatory serializer as the optional serializer provided by this trait.