-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[release/8.0] Fix deserializing null properties to Protobuf types #52468
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
Conversation
Hi @github-actions[bot]. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document. |
Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
Hi @github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed. |
Email approval |
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Backport of #52398 to release/8.0
/cc @JamesNK
Fix deserializing null properties to Protobuf types
gRPC JSON transcoding incorrectly doesn't support deserializing null values. The protobuf JSON spec says that parsing null values is supported and the default value should be set.
The fix is to allow deserializing null values and to reset a property to its default value.
Fixes #51742
Customer Impact
Apps are unable to send null values to a gRPC JSON transcoding server. They are either forced to change the client or are stuck if they can't.
There isn't a workaround.
Regression?
[If yes, specify the version the behavior has regressed from]
Risk
This is a minor change to the Microsoft.AspNetCore.Grpc.JsonTranscoding package. Nothing else in .NET depends on it.
Null values previously errored. This PR changes their behavior to set a property to its default value instead.
Verification
After:

Note:
null
values in JSON payload.Packaging changes reviewed?
When servicing release/2.1