-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[release/8.0] Fix reading null struct property value in gRPC JSON transcoding #52469
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 #52442 to release/8.0
/cc @JamesNK
Fix reading null struct property value in gRPC JSON transcoding
Struct
is a Protobuf type that represents JSON-like data, e.g.Reading null values to a struct resulted in an error. We set a null reference when
Struct
requiresValue
of type nullThe fix is to make the
Value
JSON converter handle null values, and then return aValue
of type null to the struct.Fixes #51521
Customer Impact
Apps are unable to send null values to a gRPC JSON transcoding server in struct values. 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 change only impacts the JsonConverter for the
Value
type.Verification
After:

Note: structValue has null/bool/string values.
Packaging changes reviewed?
When servicing release/2.1