{"id":19665913,"url":"https://github.com/amphp/serialization","last_synced_at":"2025-04-12T20:46:45.180Z","repository":{"id":56947344,"uuid":"248301108","full_name":"amphp/serialization","owner":"amphp","description":"Serialization tools for IPC and data storage in PHP.","archived":false,"fork":false,"pushed_at":"2023-08-29T20:22:27.000Z","size":29,"stargazers_count":120,"open_issues_count":1,"forks_count":3,"subscribers_count":8,"default_branch":"1.x","last_synced_at":"2025-04-04T00:09:53.004Z","etag":null,"topics":["amphp","php","serialization"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/amphp.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":"2020-03-18T17:40:22.000Z","updated_at":"2025-03-02T14:28:24.000Z","dependencies_parsed_at":"2024-06-18T13:41:34.058Z","dependency_job_id":null,"html_url":"https://github.com/amphp/serialization","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.15384615384615385","last_synced_commit":"d10194efb7a1d1f755f8fbb64c919d66b51043c2"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Fserialization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Fserialization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Fserialization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Fserialization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amphp","download_url":"https://codeload.github.com/amphp/serialization/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631711,"owners_count":21136559,"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":["amphp","php","serialization"],"created_at":"2024-11-11T16:25:26.363Z","updated_at":"2025-04-12T20:46:45.153Z","avatar_url":"https://github.com/amphp.png","language":"PHP","readme":"# amphp/serialization\n\nAMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind.\n`amphp/serialization` is a library providing serialization tools for IPC and data storage in PHP.\n\n[![Latest Release](https://img.shields.io/github/release/amphp/serialization.svg?style=flat-square)](https://github.com/amphp/serialization/releases)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/amphp/serialization/blob/master/LICENSE)\n\n## Installation\n\nThis package can be installed as a [Composer](https://getcomposer.org/) dependency.\n\n```bash\ncomposer require amphp/serialization\n```\n\n## Serializer\n\nThe main interface of this library is `Amp\\Serialization\\Serializer`.\n\n```php\n\u003c?php\n\nnamespace Amp\\Serialization;\n\ninterface Serializer\n{\n    /**\n     * @param mixed $data\n     *\n     * @throws SerializationException\n     */\n    public function serialize($data): string;\n\n    /**\n     * @return mixed\n     *\n     * @throws SerializationException\n     */\n    public function unserialize(string $data);\n}\n```\n\n### JSON\n\nJSON serialization can be used with the `JsonSerializer`.\n\n### Native Serialization\n\nNative serialization (`serialize` / `unserialize`) can be used with the `NativeSerializer`.\n\n### Passthrough Serialization\n\nSometimes you already have a `string` and don't want to apply additional serialization. In these cases, you can use the `PassthroughSerializer`.\n\n### Compression\n\nOften, serialized data can be compressed quite well. If you don't need interoperability with other systems deserializing the data, you can compress your serialized payloads by wrapping your `Serializer` instance in an `CompressingSerializer`.\n\n## Security\n\nIf you discover any security related issues, please email [`me@kelunik.com`](mailto:me@kelunik.com) instead of using the issue tracker.\n\n## License\n\nThe MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.\n","funding_links":[],"categories":["Unsorted yet"],"sub_categories":["Tunnel"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famphp%2Fserialization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famphp%2Fserialization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famphp%2Fserialization/lists"}