Unfortunately, attributes-based approach will not work if you'll try to use [`System.DateOnly`](https://docs.microsoft.com/dotnet/api/system.dateonly) and/or [`System.TimeOnly`](https://docs.microsoft.com/dotnet/api/system.timeonly) data types with the [`System.Text.Json`](https://docs.microsoft.com/dotnet/api/system.text.json) source generators. The only way to make generated code compilable is to use any type names not equal to [`System.DateOnly`](https://docs.microsoft.com/dotnet/api/system.dateonly) and/or [`System.TimeOnly`](https://docs.microsoft.com/dotnet/api/system.timeonly) available in object graph processed by the source generator.
0 commit comments