lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


This dumper handles recursion as well as shared sub-structures, on keys and on values; it produces valid Lua code, and the code is as simple as one could expect when there's no shared sub-structure:

https://github.com/fab13n/metalua/blob/master/src/lib/serialize.lua

As for the "seen-it table" vs. visiting stack approach questioned by David Favro, the reason to go with the "seen-it" approach are: