diff --git a/codec/json.go b/codec/json.go index eca4dc1207..cab6993cae 100644 --- a/codec/json.go +++ b/codec/json.go @@ -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