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
Sorry, I don't understand this issue. Has it anything to do with the field order at encode time? I'm using two libraries (java and this one) to create the same protobuf and getting different ordering.
@diegonc Hi, protobuf's spec do not define the order of encoded bytes. So it's valid to just have random order. if you really need specific order, you could write message yourself using pb.buffer low level routines.
Yeah, it's valid for parser but encoders should sort them by number according to the link posted above.
Anyway, I'm trying in the gist below to use pb.buffer but I'm no sure how to send fields and following Lpb_encode is getting hard as it uses things that don't seem to be available in Lua. Can you help me fill the gaps? Thanks
pb.encode的时候,如果table的metatable有定义__pairs,则通过__pairs进行遍历
The text was updated successfully, but these errors were encountered: