Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for cross-assembly discriminator properties #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

markusbuschhoff
Copy link

... that use fully qualified names

This simple patch allows for using JsonSubTypes with fully qualified or assembly qualified names to access cross-assembly subtypes via discriminator properties.

This also allows to use fully qualified names at all - beforhand they could not be found even if in same assembly.

Example baseclass usage that now can be derived in another assembly:

[JsonConverter(typeof(JsonSubtypes), "JSONType")]
public class MyBaseClass
{
    public string JSONType { get { return this.GetType().AssemblyQualifiedName; } }
}

@manuc66
Copy link
Owner

manuc66 commented Feb 26, 2021

Hi @markusbuschhoff

Could you add another assembly to the solution and a new test case ?

Thanks !

@manuc66 manuc66 added this to the 1.9.0 milestone Feb 26, 2021
@manuc66 manuc66 removed this from the 1.9.0 milestone May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants