You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep case defaults to false. This results in the default being to violate protobuf contracts until explicitly told not to. It is not protobuf.js's job to conform to casing opinions, rather to comply with the proto files provided to it. If a non camel case item exists, it should be respected. Otherwise protobuf.js is simply violating a contract just because it's not camelCase.
I'm happy to make this change if the maintainers allow it.
I understand where you are coming from. Both decisions (either true or false as a default value for keepCase) has pros and cons. Using camelCase for proto messages in JavaScript is pretty much standard these days, even the official JSON spec suggests camelCase.
Changing the default will be a big breaking change and a lot of code will stop working, so I don't think we should do it.
protobuf.js version: latest
Keep case defaults to false. This results in the default being to violate protobuf contracts until explicitly told not to. It is not protobuf.js's job to conform to casing opinions, rather to comply with the proto files provided to it. If a non camel case item exists, it should be respected. Otherwise protobuf.js is simply violating a contract just because it's not camelCase.
I'm happy to make this change if the maintainers allow it.
Edit: Here's a reference to the default
protobuf.js/src/parse.js
Line 5 in 2f846fe
The text was updated successfully, but these errors were encountered: