Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Cannot serialize object when key has underline #20

yyfrankyy opened this Issue · 6 comments

4 participants


Key hello_world in js object need to be changed to helloWorld. weird..

But what if I have another key named helloWorld ?

message {
  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


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.

@chrisdew chrisdew closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.