JSON protobuf encoding doesn't respect the proper format for field masks
RichieAHB opened this issue · comments
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?