Created
March 7, 2026 23:26
-
-
Save AnthonyGiretti/9f3c38eb566773a84a521410ad415c0d to your computer and use it in GitHub Desktop.
Before .NET 10, Handling circular references with source generation simply wasn't possible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Text.Json.Serialization; | |
| // This would throw at runtime if Employee has circular references | |
| [JsonSerializable(typeof(Employee))] | |
| internal partial class AppJsonContext : JsonSerializerContext { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment