Closed eum2o closed 1 year ago
@eum2o, this is expected behavior. grpcurl
uses the canonical JSON format for protobuf: https://protobuf.dev/programming-guides/proto3/#json
In that table, you'll see a row for "Wrapper types", one of which is google.protobuf.StringValue
. You'll see in that table that all of the wrapper types are encoded in JSON as just the value they wrap -- not as a JSON object.
@jhump I wasn't aware. Thank you for the nice explanation.
Tested with v1.8.7:
Apparently grpcurl auto-boxes
string
into agoogle.protobuf.StringValues
.Example
Take this protobuf:
I can successfully use grpcurl by calling something like
which is weird because I'd expect the JSON to look as follows:
But I'f use the latter, I get the error