protobuf-go icon indicating copy to clipboard operation
protobuf-go copied to clipboard

protoc-gen-go: Add JSON tags to oneof values and members

Open 3v1n0 opened this issue 2 years ago • 2 comments

Oneof values should include json tags to use proper camelCase name and can be safely omitted when we're handling the interface.

3v1n0 avatar Nov 29 '23 05:11 3v1n0

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Nov 29 '23 05:11 google-cla[bot]

Thank you for your interest into contributing to this project.

Unfortunately this project does not accept GitHub pull requests as the source-of-truth for this project is hosted at https://go.googlesource.com/protobuf. This project page on GitHub is a mirror of that other repository.

If you would like to contribute to this project, please follow the contribution guidelines for instructions on how to send a change. If the change you'd like to make is more substantial or introduces any new features, then it should first be discussed on the issue tracker.

Additionally, be aware that adding JSON tags to oneofs is not compliant with how the JSON mapping standard works. It is generally not recommended to using the standard library encoding/json to convert a protobuf to JSON, precisely because it cannot work in manner that is compliant with the protobuf JSON mapping standards.

puellanivis avatar Nov 29 '23 08:11 puellanivis