Comments (3)
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.
https://developers.google.com/protocol-buffers/docs/encoding#order
from lua-protobuf.
@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.
from lua-protobuf.
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
https://gist.github.com/diegonc/d6af5520e8966340ccf27977220beb71
from lua-protobuf.
Related Issues (20)
- proto3怎么区分默认值和缺省值呢? HOT 1
- symbol not found in flat namespace '_luaL_checkversion_' HOT 1
- 您好,请问oneof支持吗?lua里面怎么使用呢 HOT 1
- 当include_imports和unknow_import都为true时,会出现错误
- 希望支持 oneof 的 DefaultMessageDecoding HOT 1
- bad argument #1 to 'encode' (type 'Person' does not exists) HOT 8
- pb.so causes nginx to segfault HOT 4
- 循环引用场景下会导致stack overflow HOT 1
- pb.decode() 导致 out of memory HOT 1
- pb中uint64过长, 在decode时会被科学计数法 HOT 1
- pb.decode 问题。 HOT 1
- Option name expected
- Proto - JSON transcoder HOT 2
- nested message with default values regression HOT 1
- protobuf3 optional: configurable "optional_" prefix HOT 3
- pb.encode double/float 类型数据,在C++里ParseFromString会有问题。 HOT 2
- Decode to a temporary message to extract or change data
- Segfaults with gcc 13 and `-fstrict-aliasing` HOT 12
- 请问下java的.proto文件存在import引用其它文件如何加载 HOT 1
- Running on ESP32: load() function not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-protobuf.