Skip to content

[Experimental], JSON polymorphism, and the JSON source generator don't play well together #119451

@stephentoub

Description

@stephentoub

You have a base type that you serialize/deserialize with JsonSerializer.
You also use the JSON source generator.
Now you add a new derived type from that base class and you mark the derived type as [Experimental].

Anyone using your base class, even if they don't use the derived experimental type, now gets compilation errors stemming from the source generator emitting use of the derived [Experimental] type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Text.JsonenhancementProduct code improvement that does NOT require public API changes/additionssource-generatorIndicates an issue with a source generator feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions