vovo4ka Posted June 18, 2012 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!
vovo4ka Posted June 24, 2012 Author 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!!!
MTA Team qaisjp Posted June 27, 2012 MTA Team Posted June 27, 2012 I may be wrong, but doesn't var_dump do this?
vovo4ka Posted June 27, 2012 Author Posted June 27, 2012 var_dump performs only one-way conversion. Moreover, its implemented as lua script and performance should be low.
Recommended Posts