table serialization for Lua