Specifying the JSON name for protobuf extension
问题 I've added an extending message to a message and need to marshal it as a json. However the field name for the extension message is [message.extension_message_name] . I would prefer it to be named just extension_message_name , without the braces and prefix, since this extension message exists elsewhere in our API and and having this weird name adds confusion. As far as I can tell the bit of code responsible is in protobuf/jsonpb, where the JSONName is set with fmt.Sprintf("[%s]", desc.Name and