[]求救:proto解析 _i会变成I
我用的是laya自带的protobuf.js,
message packetc2g_select_gate {
optional e_server_msg_type packet_id = 1 [default = e_mst_c2g_select_gate];
optional int32 packet_iid = 2 [default = 302];
optional int64 packet_iiid = 3 [default = 302];
optional string packet_iidiid = 4;
}
通过
ProtoBuf.load("protocol.proto", this.onLoaded);
function onLoaded(err:any, root:any):void{
if (err)
throw err;
// Obtain message types
var msgDefine:any = = root.lookup("protocols.packetc2g_select_gate");
var newMessage:any = msgDefine.create();
}
然后发现里面的成员名字都变了 “_i”变成了大写的“I”
message packetc2g_select_gate {
optional e_server_msg_type packet_id = 1 [default = e_mst_c2g_select_gate];
optional int32 packet_iid = 2 [default = 302];
optional int64 packet_iiid = 3 [default = 302];
optional string packet_iidiid = 4;
}
通过
ProtoBuf.load("protocol.proto", this.onLoaded);
function onLoaded(err:any, root:any):void{
if (err)
throw err;
// Obtain message types
var msgDefine:any = = root.lookup("protocols.packetc2g_select_gate");
var newMessage:any = msgDefine.create();
}
然后发现里面的成员名字都变了 “_i”变成了大写的“I”
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Monica - 知识达人
赞同来自: