Disable automatic camelCasing in proto JSON (#6833)

This commit is contained in:
Aaron Craelius
2020-07-23 22:16:44 +00:00
committed by GitHub
parent 0a498d8c18
commit b20b26d8d1
+1 -1
View File
@@ -12,7 +12,7 @@ import (
// ProtoMarshalJSON provides an auxiliary function to return Proto3 JSON encoded
// bytes of a message.
func ProtoMarshalJSON(msg proto.Message) ([]byte, error) {
jm := &jsonpb.Marshaler{EmitDefaults: false, OrigName: false}
jm := &jsonpb.Marshaler{OrigName: true}
err := types.UnpackInterfaces(msg, types.ProtoJSONPacker{JSONPBMarshaler: jm})
if err != nil {
return nil, err