-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate fast-path serialize logic for nullable structs #59719
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json Issue DetailsThe JSON source generator doesn't generate serialization logic for nullable structs, but it could. The following method should be extended to include this support:
See also #51945.
|
@layomia Hey, I would like to work on the issue. I have done some investigations and it seems I need your assistance. |
@layomia There are cases when a structs implements any enumerable interface. For example |
Closing as fast-past methods for underlying types are already being invoked - #60366 (comment). |
If we really wanted to eek out the last mile of perf for nullable structs, we would need to add a new method to attach the generated fast-path logic to, e.g. |
The JSON source generator doesn't generate optimized serialization logic for nullable structs, but it could. The following method should be extended to include this support:
runtime/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
Line 353 in 7a58bef
See also #51945.
The text was updated successfully, but these errors were encountered: