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
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);
The text was updated successfully, but these errors were encountered:
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);
The text was updated successfully, but these errors were encountered: