Skip to content

Commit

Permalink
Disable automatic camelCasing in proto JSON (#6833)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronc authored Jul 23, 2020
1 parent 0a498d8 commit b20b26d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codec/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b20b26d

Please sign in to comment.