Closed fperrad closed 7 years ago
Thank you for the pointer! I added it. What is your approach for distinguishing between array and map on serialization (Lua only has tables, IIRC)?
Ah, right. (You probably don't mean "greater than 1", though :-)
It is intentional, Lua arrays are 1-based. See https://en.wikipedia.org/wiki/Lua_(programming_language)#As_array
Sure, but "A Lua table is converted into a CBOR array only if all the keys are composed of positive integers greater than 1, [...]." means that any table that has an element with an index of 1 (i.e., most array-like data) is not converted to a CBOR array. I don't think that is what you mean.
Right, composed of positive integers greater or equal than 1
or composed of strictly positive integers
(Your docs still seem to say "positive integers greater than 1, ".) Closing this issue now; thanks again for the pointer.
lua-ConciseSerialization is a pure Lua implementation of CBOR.
Install via
luarocks
See http://fperrad.github.io/lua-ConciseSerialization/