2 ms·
Lua has its own built-in low-level serialization, in the form of string.pack() and string.unpack()[1]. This is akin to Perl's pack()[2]. But note that this is
by turtledragonfly 2y ago
Lua has its own built-in low-level serialization, in the form of string.pack() and string.unpack()[1]. This is akin to Perl's pack()[2].
But note that this is a tool used for laying out bytes in a certain order (like a C struct), not a general "serialization framework" for traversing data structures and whatnot. But it can be the building block for one.
[1] https://www.lua.org/manual/5.4/manual.html#6.4.2 https://www.lua.org/manual/5.4/manual.html#6.4.2
[2] https://perldoc.perl.org/functions/pack https://perldoc.perl.org/functions/pack