|
Am 14.12.2012 um 12:34 schrieb Michal Kottman: On 14 December 2012 12:16, Philipp Kraus <philipp.kraus@flashpixx.de> wrote: That's nice and seems to be a good trial, but do you know if I can serialize / desialize on the C side? On a short view to the link, there are only Lua scripts to create the serialize / deserialize, but I would like to do this not on the script side. I think I can write my own serialization, after the pcall is run I can run over the stack items and read them into a C structure, but I have got a problem on table data eg { "key1" : 123, "key2" : "test123" } In this case I have a table with a string key type and different value type, but on the C side I can not convert this to a std::map or anything else, because the map need one fix key and value type and without knowledge about the structure it is very difficult to find a generic serialization. Do you think serialization on the Lua script is a better choice or do you think serialization on the C side is better? Thanks Phil |