Skip to content

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