unpack function worked error with a table whose key is not a number.
for example:
local map = {['book'] = 'haha'}
local packStr = cmsgpack.pack(map)
return cmsgpack.unpack(packStr)
The result is (empty list or set).The packStr really is \x81\xa4book\xa4haha.
But if you do like this, it is right:
local map = {[1] = 'haha'}
which key is a number instead of a string
unpack function worked error with a table whose key is not a number. for example: local map = {['book'] = 'haha'} local packStr = cmsgpack.pack(map) return cmsgpack.unpack(packStr) The result is (empty list or set).The packStr really is \x81\xa4book\xa4haha. But if you do like this, it is right: local map = {[1] = 'haha'} which key is a number instead of a string