{"id":13526229,"url":"https://github.com/gvx/Ser","last_synced_at":"2025-04-01T07:31:37.427Z","repository":{"id":66570221,"uuid":"14088487","full_name":"gvx/Ser","owner":"gvx","description":"A fast, robust, richly-featured table serialisation library for Lua","archived":false,"fork":false,"pushed_at":"2016-05-19T23:03:02.000Z","size":16,"stargazers_count":75,"open_issues_count":0,"forks_count":16,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-02T11:32:13.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gvx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-11-03T16:17:28.000Z","updated_at":"2024-08-22T22:07:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"163fadfa-dbb0-4683-9ab0-7ef788d265ac","html_url":"https://github.com/gvx/Ser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvx%2FSer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvx%2FSer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvx%2FSer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvx%2FSer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gvx","download_url":"https://codeload.github.com/gvx/Ser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246600720,"owners_count":20803467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T06:01:26.653Z","updated_at":"2025-04-01T07:31:37.117Z","avatar_url":"https://github.com/gvx.png","language":"Lua","funding_links":[],"categories":["资源","Serialization","Resources"],"sub_categories":["Humanize"],"readme":"\u003e Since 2016-02-16, Ser is **deprecated**. I will still fix reported bugs, but for new projects, I recommend [bitser](https://github.com/gvx/bitser) if you're using LuaJIT, and [binser](https://github.com/bakpakin/binser)\notherwise.\n\nSer\n===\n\nSer is a fast, robust, richly-featured table serialization library for Lua. It\nwas specifically written to store configuration and save files for\n[LÖVE](http://love2d.org/) games, but can be used anywhere.\n\nOriginally, this was the code to write save games for\n[Space](https://github.com/gvx/space), but was released as a stand-alone\nlibrary after many much-needed improvements.\n\nLike Space itself, you use, distribute and extend Ser under the terms of the\nMIT license.\n\nSimple\n------\n\nSer is very simple and easy to use:\n\n```lua\nlocal serialize = require 'ser'\n\nprint(serialize({\"Hello\", world = true}))\n-- prints:\n-- return {\"Hello\", world = true}\n```\n\nFast\n----\n\nUsing Serpent's benchmark code, Ser is 33% faster than Serpent.\n\nRobust\n------\n\nSometimes you have strange, non-euclidean geometries in your table\nconstructions. It happens, I don't judge. Ser can deal with that, where some\nother serialization libraries cry \"Iä! Iä! Cthulhu fhtagn!\" and give up \u0026mdash;\nor worse, silently produce incorrect data.\n\n```lua\nlocal serialize = require 'ser'\n\nlocal cthulhu = {{}, {}, {}}\ncthulhu.fhtagn = cthulhu\ncthulhu[1][cthulhu[2]] = cthulhu[3]\ncthulhu[2][cthulhu[1]] = cthulhu[2]\ncthulhu[3][cthulhu[3]] = cthulhu\nprint(serialize(cthulhu))\n-- prints:\n-- local _3 = {}\n-- local _2 = {}\n-- local _1 = {[_2] = _3}\n-- local _0 = {_1, _2, _3}\n-- _0.fhtagn = _0\n-- _2[_1] = _2\n-- _3[_3] = _0\n-- return _0\n```\n\nTested\n------\n\nCheck out `tests.lua` to see how Ser behaves with all kinds of inputs.\n\nOther solutions\n---------------\n\nCheck out the [Lua-users wiki](http://lua-users.org/wiki/TableSerialization)\nfor other libraries that do roughly the same thing.\n\nSee also\n--------\n\n* [Lady](https://github.com/gvx/Lady): for trusted-source savegames\n* [Smallfolk](https://github.com/gvx/Smallfolk): for untrusted-source serialization\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvx%2FSer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgvx%2FSer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvx%2FSer/lists"}