Replacing jsonpb into protojson is needed because jsonpb has been deprecated.
Additionally, protojson allows us to use marshalOptions to use snake_case keys for marshalling. Only camelCase is supported currently in grpc access logs and it seems it's not a good practice.
protojson.MarshalOptions{
UseProtoNames: true,
EmitUnpopulated: true,
},
Replacing
jsonpbintoprotojsonis needed becausejsonpbhas been deprecated.Additionally, protojson allows us to use marshalOptions to use
snake_casekeys for marshalling. OnlycamelCaseis supported currently in grpc access logs and it seems it's not a good practice.