.NET 11 Expands System.Text.Json
.NET 11 adds C# and F# union serialization, JSON Lines, closed-hierarchy polymorphism, open generic derived types, and broader source-generation support to System.Text.Json. The update makes modern domain models easier to serialize, though F# unions remain reflection-only and ambiguous object unions require custom classifiers.
This is a substantial evolution of System.Text.Json from fast POCO serialization into a more expressive contract system, with real benefits for strongly typed applications but several compatibility boundaries developers must understand. [Microsoft’s .NET 11 announcement](https://devblogs.microsoft.com/dotnet/announcing-dotnet-11/) and [serialization documentation](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-11/libraries) detail the changes.
- –C# unions serialize their active case directly, avoiding wrapper objects and making discriminator-free JSON practical when shapes are distinct.
- –Closed hierarchies can infer derived types and emit stable discriminators, reducing repetitive `[JsonDerivedType]` registration.
- –Source generation now supports explicitly included private, internal, and protected members plus inaccessible constructors, improving trimming and Native AOT scenarios.
- –JSON Lines support makes streaming `IAsyncEnumerable<T>` data to logs, pipelines, and ingestion systems much cleaner.
- –Teams should test ambiguous unions, F# reflection-only support, source-generated metadata coverage, and wire-format compatibility before upgrading production services.
DISCOVERED
19m ago
2026-11-11
PUBLISHED
3h ago
2026-11-11
RELEVANCE
AUTHOR
dotnet