Disable automatic camelCasing in proto JSON (#6833)
This commit is contained in:
parent
0a498d8c18
commit
b20b26d8d1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue