protobuf.js icon indicating copy to clipboard operation
protobuf.js copied to clipboard

how to define protofile for [[1, 2, 3]]

Open yxrobert opened this issue 1 year ago • 0 comments

how to define Two-dimensional Array, like [[1, 2, 3]] or [[{}, {}, {}]] i made proto like, but it doesn't work

message Data { repeated uint32 val = 1; }

message DataList { repeated Data list = 1; }

let obj = [[1, 2, 3]]; var MyMessage = root.lookupType('DataList '); err = MyMessage.verify(obj); let msg = MyMessage.fromObject(obj);

yxrobert avatar Apr 13 '24 08:04 yxrobert