Skip to content
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

JSON protobuf encoding doesn't respect the proper format for field masks #393

Open
RichieAHB opened this issue May 10, 2023 · 0 comments
Open

Comments

@RichieAHB
Copy link

RichieAHB commented May 10, 2023

The encoding and decoding for protobuf field masks via gRPCurl is incorrect.

The protobuf reference defines a comma separate list of strings for field masks, whereas gRPCurl just maps between the JSON and protobuf as if it were any other proto and expects an array of strings under a paths field in an object (i.e. repeated string paths).

This cause problems when piping JSON decoded protos into gRPCurl.

It looks like the reason for this is that gRPCurl uses jsonpb, a deprecated library that doesn't feature FieldMask in its switch for well known types when decoding. Whereas the more modern protobuf-go library does.

Would you be open to updating the encoding to protobuf-go given this would be a relatively notable breaking change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant