{"id":15354890,"url":"https://github.com/capaj/refserialize","last_synced_at":"2025-07-15T19:41:27.637Z","repository":{"id":57352204,"uuid":"74385461","full_name":"capaj/refserialize","owner":"capaj","description":"a utility for serializing/deserializing POJOs with object references","archived":false,"fork":false,"pushed_at":"2016-11-28T00:36:45.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T22:03:13.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/capaj.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}},"created_at":"2016-11-21T16:57:04.000Z","updated_at":"2016-12-02T22:08:03.000Z","dependencies_parsed_at":"2022-09-19T02:42:48.690Z","dependency_job_id":null,"html_url":"https://github.com/capaj/refserialize","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/capaj/refserialize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Frefserialize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Frefserialize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Frefserialize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Frefserialize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capaj","download_url":"https://codeload.github.com/capaj/refserialize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Frefserialize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265455752,"owners_count":23768612,"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-10-01T12:21:32.776Z","updated_at":"2025-07-15T19:41:27.605Z","avatar_url":"https://github.com/capaj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# refserialize\n\nSerialize your POJO objects and retain reference equality between multiple references to the same objects\n\n## Install\n```\nnpm i refserialize\n```\n\nExample:\n```javascript\nconst refserialize = require('refserialize')\n\nvar a = {b: 1}\nvar o = {\n    c: a,\n    d: a\n}\nconst str = refserialize.stringify(o)\nconst parsed = refserialize.parse(str)\nparsed.c === parsed.d // true\n\n```\nKeep in mind that this only works inside one parent object. If you call serialize twice on two different objects, which have some common reference, this reference will not be resolved into a single object. You really need to put your two objects into one parent object.\nAlso beware of the performance. I have not tested this with large objects, but expect it to be quite slow.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Frefserialize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapaj%2Frefserialize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Frefserialize/lists"}