Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ForceUppercaseEnums option on JSON unmarshalling options #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bobbytables
Copy link

@bobbytables bobbytables commented Dec 19, 2023

For systems that send in lowercase enums such as in API requests, this option is helpful to first uppercase the encoded value before doing a lookup for the enum by name.

There have been mentions of this in past issues, and I think an unmarshal option is a nice way to give people flexibility on how enums are handled.

For systems that send in lowercase enums such as in API requests, this option is helpful to first uppercase the encoded value before doing a lookup for the enum by name.
Copy link

google-cla bot commented Dec 19, 2023

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.

@puellanivis
Copy link

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.

@danbroudy
Copy link

@bobbytables do you plan to follow up on this? This seems like a great addition to the library. If not, I would like to keep moving this request forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants