-
Notifications
You must be signed in to change notification settings - Fork 43
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
Correct serialization of google::protobuf::Any #2
Comments
For what it is worth, I hit this today as well Here is an example which might help pbjson produces:
When the binary value in
When I manually changed my pbjson to look like this
Then grpcurl was able to handle it |
Running into this issue as well with an api that sends the data with the "@type" and unpacked data in the rest of the body. Is there any ideas on how to fix this? |
Running into this as well. I'm using |
If anyone has time to whip up some tests showing what is wrong / what would help that would be swell. A PR to support it would be even better! |
Here's a quick test for serialization. I haven't yet tried an implementation. main...blinsay:pbjson:any-tests In whipping this up I went to go put together a standalone example repo to try and see how deserialization might work and I fell into a gnarly hole trying to configure well-known types. I think one of the hardest things about support here may be configuring other generated code to use this implementation of Deserialization seems like it will require some knowledge of existing registered types, and I'm not sure how the whole |
From https://developers.google.com/protocol-buffers/docs/proto3#json
Currently Any is not special cased and is therefore not serialized/deserialized to/from this custom representation. This should be fixed
The text was updated successfully, but these errors were encountered: