{"id":19138378,"url":"https://github.com/rochet2/luaserializer","last_synced_at":"2026-03-09T11:05:01.745Z","repository":{"id":77534697,"uuid":"36689973","full_name":"Rochet2/LuaSerializer","owner":"Rochet2","description":"LuaSerializer is a pure lua serializer that does not use loadstring or pcall for table deserialization","archived":false,"fork":false,"pushed_at":"2017-02-01T18:50:18.000Z","size":17,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T20:52:51.498Z","etag":null,"topics":["lua","lua-serializer","serializer"],"latest_commit_sha":null,"homepage":"http://rochet2.github.io/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rochet2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-01T21:27:34.000Z","updated_at":"2024-12-02T23:25:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9c0c9bf-64e4-4f04-aabe-8b2b41937f00","html_url":"https://github.com/Rochet2/LuaSerializer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rochet2/LuaSerializer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rochet2%2FLuaSerializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rochet2%2FLuaSerializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rochet2%2FLuaSerializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rochet2%2FLuaSerializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rochet2","download_url":"https://codeload.github.com/Rochet2/LuaSerializer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rochet2%2FLuaSerializer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30291855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","lua-serializer","serializer"],"created_at":"2024-11-09T06:42:45.957Z","updated_at":"2026-03-09T11:05:01.712Z","avatar_url":"https://github.com/Rochet2.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LuaSerializer\nIt is recommended to use smallfolk instead. It is a lot faster and creates smaller and more readable output. It also has a C++ version for C++ compatibility needs: https://github.com/gvx/Smallfolk https://github.com/Rochet2/smallfolk_cpp\nLuaSerializer is a pure lua serializer that does not use loadstring or pcall for table deserialization. Works with Lua 5.1 and 5.2.  \nBacklink: https://github.com/Rochet2/LuaSerializer\n\n#Limitations\n- Tables with cycles can not be serialized.\n- Metatables are not serialized.\n- Userdata can not be serialized\n- Functions can not be serialized, but you can try serialize string.dump or the function contents as string\n- Compression safety is questionable for unknown source data, use it only for server-\u003eclient or otherwise safe assumed data\n\n#Serializing\nLuaSerializer serializes data into a string and is able to then deserialize the data without using loadstring or pcall (safely, not calling functions).  \nLuaSerializer is capable of safely serializing and deserializing:\n- nil\n- bool\n- string\n- number including nan and inf\n- tables with no unserializable data and no cycles\n\n#API\n```lua\nlocal LuaSerializer = LuaSerializer or require(\"LuaSerializer\")\n\n-- Some lua compatibility between 5.1 and 5.2\nlocal unpack = unpack or table.unpack\n\n-- Takes in values and returns a string with them serialized\n-- Uses LZW compression, use LuaSerializer.serialize_nocompress if you dont want this\n-- LuaSerializer.serialize(...)\n\n-- Takes in a string of serialized data and returns a table with the values in it and the amount of values\n-- The data must have been serialized with LuaSerializer.serialize_nocompress\n-- LuaSerializer.unserialize(serializeddata)\n\nlocal serialized = LuaSerializer.serialize(55, \"test\", {1,2, y = 66}, nil, true)\nlocal data, n = LuaSerializer.unserialize(serialized)\nprint(unpack(data, 1, n))\n-- prints:\n-- 55      test    table: 491A9920 nil     true\n\n-- Takes in values and returns a string with them serialized\n-- Does not compress the result\n-- LuaSerializer.serialize_nocompress(...)\n\n-- Takes in a string of serialized data and returns a table with the values in it and the amount of values\n-- The data must have been serialized with LuaSerializer.serialize\n-- LuaSerializer.unserialize_nocompress(serializeddata)\n\nlocal serialized = LuaSerializer.serialize_nocompress(55, \"test\", {1,2, y = 66}, nil, true)\nlocal data, n = LuaSerializer.unserialize_nocompress(serialized)\nprint(unpack(data, 1, n))\n-- prints:\n-- 55      test    table: 491A9920 nil     true\n```\n\n#Included dependencies\nYou do not need to get these, they are already included\n- Compression for string data: https://love2d.org/wiki/TLTools\n\n#Special thanks\n- Kenuvis \u003c [Gate](http://www.ac-web.org/forums/showthread.php?148415-LUA-Gate-Project), [ElunaGate](https://github.com/ElunaLuaEngine/ElunaGate) \u003e\n- Laurea (alexeng) \u003c https://github.com/Alexeng \u003e\n- Lua contributors \u003c http://www.lua.org/ \u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frochet2%2Fluaserializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frochet2%2Fluaserializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frochet2%2Fluaserializer/lists"}