GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Key hello_world in js object need to be changed to helloWorld. weird..
But what if I have another key named helloWorld ?
required string hello_world = 1;
required string helloWorld = 2;
Having the same issue on protobuf v0.8.6. Any key with an underscore does not get serialized.
Submitted pull request to fix this issue. #21
Merge pull request #21 from AdamMagaluk/master
Fix for Bug #20, uses Protobuf FieldDescriptor->name()
Currently the default functionality is to convert all assessors to camel case. "hello_world" would then be accessed by "helloWorld".
Using underscore separated names for field names in the convention in protobuf. If your schema defines hello_world and helloWorld in the same message, then you should complain to the author of the schema, because it will break the official Java implementation as well.
@seishun If it broke the official java implementation as well, then that's a problem. Language compatibility is one of the features that protobuf provides, as I known so far, cpp, ruby, python implementations are ok with this.
I'm closing this, as there's been no activity, and @seishun is right.