{"id":19594448,"url":"https://github.com/swoft-cloud/swoft-serialize","last_synced_at":"2025-08-19T22:13:59.163Z","repository":{"id":57063229,"uuid":"221008447","full_name":"swoft-cloud/swoft-serialize","owner":"swoft-cloud","description":"Data serializer for PHP","archived":false,"fork":false,"pushed_at":"2019-12-17T03:25:12.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-05T00:22:14.332Z","etag":null,"topics":["php-library","serialization","swoft-component"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swoft-cloud.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":"2019-11-11T15:14:54.000Z","updated_at":"2024-12-16T05:57:05.000Z","dependencies_parsed_at":"2022-08-24T14:00:41.194Z","dependency_job_id":null,"html_url":"https://github.com/swoft-cloud/swoft-serialize","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/swoft-cloud/swoft-serialize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swoft-cloud%2Fswoft-serialize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swoft-cloud%2Fswoft-serialize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swoft-cloud%2Fswoft-serialize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swoft-cloud%2Fswoft-serialize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swoft-cloud","download_url":"https://codeload.github.com/swoft-cloud/swoft-serialize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swoft-cloud%2Fswoft-serialize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271231128,"owners_count":24723059,"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-08-19T02:00:09.176Z","response_time":63,"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":["php-library","serialization","swoft-component"],"created_at":"2024-11-11T08:43:33.780Z","updated_at":"2025-08-19T22:13:59.132Z","avatar_url":"https://github.com/swoft-cloud.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Serialize\n\n[![Latest Stable Version](http://img.shields.io/packagist/v/swoft/serialize.svg)](https://packagist.org/packages/swoft/serialize)\n[![Php Version](https://img.shields.io/badge/php-%3E=7.1-brightgreen.svg?maxAge=2592000)](https://secure.php.net/)\n[![Library License](https://img.shields.io/hexpm/l/plug.svg?maxAge=2592000)](https://github.com/swoft-cloud/swoft-serialize/blob/master/LICENSE)\n[![Actions Status](https://github.com/swoft-cloud/swoft-serialize/workflows/Unit-tests/badge.svg)](https://github.com/swoft-cloud/swoft-serialize/actions)\n\nUniversal data serializer for PHP\n\nSerializers:\n\n- json(by `json_encode`)\n- php(by `serialize`)\n- igbinary(by extension `igbinary`)\n- msgpack(by extension `msgpack`)\n\n## Install\n\n- composer command\n\n```bash\ncomposer require swoft/serialize\n```\n\n## Usage\n\n```php\n$serializer = new JsonSerializer();\n// $serializer = new PhpSerializer();\n// $serializer = new IgBinarySerializer();\n// $serializer = new MsgPackSerializer();\n\n// serialize data\n$string = $serializer-\u003eserialize($data);\n\n// unserialize string\n$data = $serializer-\u003eunserialize($string);\n```\n\n## Unit testing\n\n```bash\nphpunit \n```\n\n## LICENSE\n\nThe Component is open-sourced software licensed under the [Apache license](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswoft-cloud%2Fswoft-serialize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswoft-cloud%2Fswoft-serialize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswoft-cloud%2Fswoft-serialize/lists"}