{"by":"girvel","descendants":41,"id":42886079,"kids":[42886513,42886324,42886673,42888819,42888862,42886460,42886268,42887773,42886685,42886632,42887653,42888750],"score":96,"text":"Some time ago, I was implementing saves for my LOVE2D game. I wanted to do a full dump of the game state -- which included closures (AI), complex graphs, sets with tables as keys and also fundamentally non-serializable data (coroutines and userdata), that require user-defined serialization&#x2F;deserialization logic. I went through every Lua serialization library -- none covered all data types&#x2F;cases. So I wrote my own.<p>It is a polished version, thoroughly annotated, tested and documented. It is made to be as functional and customizable as possible (or at least I did everything I could think of). I would be happy to hear suggestions&#x2F;corrections for both code and documentation -- even nitpicky ones.","time":1738315792,"title":"Show HN: Ldump – serialize any Lua data","type":"story","url":"https://github.com/girvel/ldump"}