8000 Extracting polymorphic serializer, sub with multiple bases · Issue #56 · agcom/bson · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 24, 2021. It is now read-only.
This repository was archived by the owner on Jun 24, 2021. It is now read-only.
Extracting polymorphic serializer, sub with multiple bases #56
Open
@agcom

Description

@agcom

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0