-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Have an option to use snake_case for message properties #564
Comments
Currently, v6 always converts to camel case for simplicity. Google's JS implementation also does this. pbjs's proto2/3 targets always convert back. Do you have a specific use case where this fails or snake_case is absolutely required? |
Can't say that I have a hard requirement for snake_case :) |
pbjs now supports the option |
@dcodeIO cool! When will it get released on npm? |
Maybe tonight as 6.2.1 if there are no more pending issues. |
Awesome, thanks for the quick fix! I will check during the weekend for our definition |
It's on npm now! Feel free to reopen if there are issues. |
Hi! |
Yes: Root#load var root = new protobuf.Root();
root.load(..., { keepCase: true }).then(...); |
Great, thanks for your help! |
Thank you help, I finally found the answer |
Is there a way to --keep-case for static modules. Its a big problem when using typescript. |
protobuf.js version: 6.1.1
I'm running pbjs utility to generate JSON for my proto files, but the issue is that it generates camelCase property names (proto files have snake_case).
Is there already some configuration for this (found a broken link to wiki article) or is it possible to include one?
The text was updated successfully, but these errors were encountered: