When I use grpcurl to test this service, I currently receive a response which includes lowerCamelCase field names. This is unexpected.
{
"exampleField": "foo"
}
I expect the grpcurl output to use the same field names in the JSON response as found in proto, so that I can make sense of the protobuf file as documentation. Returning different field names is confusing.
{
"example_field": "foo"
}
I've tracked the issue down to grpcurl's use of json marshaler. I found that ProtoJSON offers an option to use the original proto names: https://pkg.go.dev/google.golang.org/protobuf/encoding/protojson; see UseProtoNames. I would like to option to enable display of original field names.
Given the following message in a protobuf file
When I use grpcurl to test this service, I currently receive a response which includes lowerCamelCase field names. This is unexpected.
I expect the grpcurl output to use the same field names in the JSON response as found in proto, so that I can make sense of the protobuf file as documentation. Returning different field names is confusing.
I've tracked the issue down to grpcurl's use of json marshaler. I found that ProtoJSON offers an option to use the original proto names: https://pkg.go.dev/google.golang.org/protobuf/encoding/protojson; see UseProtoNames. I would like to option to enable display of original field names.