{"id":23757576,"url":"https://github.com/scientanl/graph-serializer","last_synced_at":"2025-09-05T04:32:19.983Z","repository":{"id":31875016,"uuid":"129715924","full_name":"ScientaNL/graph-serializer","owner":"ScientaNL","description":"Graph Serializer","archived":false,"fork":false,"pushed_at":"2024-11-29T15:34:12.000Z","size":557,"stargazers_count":4,"open_issues_count":9,"forks_count":4,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-08-30T08:14:16.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ScientaNL.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":"2018-04-16T09:09:54.000Z","updated_at":"2024-11-29T15:33:33.000Z","dependencies_parsed_at":"2024-11-29T16:26:40.266Z","dependency_job_id":"8959b1a1-d47f-4e3c-a819-1999bcc386a7","html_url":"https://github.com/ScientaNL/graph-serializer","commit_stats":null,"previous_names":["syslogicnl/graph-serializer"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/ScientaNL/graph-serializer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Fgraph-serializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Fgraph-serializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Fgraph-serializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Fgraph-serializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScientaNL","download_url":"https://codeload.github.com/ScientaNL/graph-serializer/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Fgraph-serializer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273713293,"owners_count":25154607,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-31T19:49:04.573Z","updated_at":"2025-09-05T04:32:14.969Z","avatar_url":"https://github.com/ScientaNL.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graph-serializer\n\nGraph serializer is a lightweight library for converting JSON data structures to typed objects usable in typescript. Benefits include better type checking in your IDE, better type safety, and standardized date conversion. Primary use case is for easy integration of RESTful services and typescript.\n\n## Installation\n\nAdd graph-serializer to your dependencies:\n```shell\nnpm i --save @syslogic/graph-serializer\n```\n\n## Usage\n\nGraph-serializer provides an annotation which you can use in your typescrpt entities. You can use the `@serializable` to specify which properties need to be (de)serialized.\n\nThe `serialize` and `deserialize` functions can then be used with the entity\n\n### Basic usage\n\n```typescript\nimport {serializable, deserialize, serialize} from \"@syslogic/graph-serializer\"\n\nclass Foo {\n    @serializable()\n    public thisWillBeSerialized: string = 'test';\n}\n\nlet fooObj = deserialize(Foo, {thisWillBeSerialized: 'bar'}); // fooOjb instanceof Foo === true\nlet fooGraph = serialize(new Foo()); //  fooGraph = {thisWillBeSerialized: 'bar'}\n\n```\n\n### Advanced\n\nThere are a few serializer parameters to seraialize all sorts of serializers. Check the [test directory](tests/) for more examples. Features include:\n\n - Proper `Date` deserialization\n - Nested serialization\n - Serialize and deserialize including subclasses (class hierarchy)\n - Arrays, multilevel arrays\n - Object maps / Hash maps\n - Union types\n - Polymorphic arrays\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientanl%2Fgraph-serializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscientanl%2Fgraph-serializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientanl%2Fgraph-serializer/lists"}