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

Does not support parameter name like "a_b_c" #50

Open
lmyzzu opened this issue Mar 9, 2015 · 0 comments
Open

Does not support parameter name like "a_b_c" #50

lmyzzu opened this issue Mar 9, 2015 · 0 comments

Comments

@lmyzzu
Copy link

lmyzzu commented Mar 9, 2015

if use parameter name like "a_b_c" , get the exception follow :
Can't parse message of type "***" because it is missing required fields: "a_b_c"

because object.serialize() not handle the fields: "a_b_c"
//common.proto
package org.commmon;
message BaseInfo
{
required string id = 1;
required int32 last_go_time = 8;
}
var fs = require('fs');
var Schema = require('protobuf').Schema;

var common = new Schema(fs.readFileSync("./protos/common.desc"));
var Info = fishingjoy3["org.commmon.BaseInfo"];
var pmsg = Info.serialize({
"id": 'id',
"last_go_time": 12452475
});
console.log(pmsg.length);
var jmsg=uInfo.parse(pmsg);
console.log(jmsg);

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

No branches or pull requests

1 participant