Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Extracting polymorphic serializer, sub with multiple bases #56

Open
agcom opened this issue Sep 21, 2020 · 0 comments
Open

Extracting polymorphic serializer, sub with multiple bases #56

agcom opened this issue Sep 21, 2020 · 0 comments
Labels
feature A new functionality

Comments

@agcom
Copy link
Owner

agcom commented Sep 21, 2020

CodecRegistry documentation says If a class is registered under multiple polymorphic serializers, the chosen serializer is unpredictable.

There are clean workaround for this and are well known.

The workarounds include using the SerializationCodec` class.

However, the unpredictable behavior can be removed.

The idea is to declare an SerialInfo annotation and if multiple bases are present for a sub, then the base annotated with the declared annotation will take precedence.

Can call the annotation DefaultBase or something like that.

@agcom agcom added the feature A new functionality label Sep 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature A new functionality
Projects
None yet
Development

No branches or pull requests

1 participant