vovo4ka Posted June 18, 2012 Share Posted June 18, 2012 I wondered about serialization a huge tables. And it would be great if MTA would have built-in serialization functions for lua tables, because serialization by lua script is too slow (exceeds execution time limit). There are several implementations in C++ described here: http://lua-users.org/wiki/TableSerialization There are only 2 functions are needed: string serialize(table) and table unserialize(string) Thx! Link to comment
vovo4ka Posted June 24, 2012 Author Share Posted June 24, 2012 I found toJSON/fromJSON functions https://wiki.multitheftauto.com/wiki/ToJSON upd. Oh no! It cannot handle integer indexes in tables!!! Link to comment
qaisjp Posted June 27, 2012 Share Posted June 27, 2012 I may be wrong, but doesn't var_dump do this? Link to comment
vovo4ka Posted June 27, 2012 Author Share Posted June 27, 2012 var_dump performs only one-way conversion. Moreover, its implemented as lua script and performance should be low. Link to comment
Recommended Posts