PHPackages                             swoft-fork/serialize - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. swoft-fork/serialize

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

swoft-fork/serialize
====================

simple data serializer tool library of the php

v2.1.0(1y ago)031Apache-2.0PHPPHP &gt;8.0

Since Dec 5Pushed 1y agoCompare

[ Source](https://github.com/sky-up/swoft-serialize)[ Packagist](https://packagist.org/packages/swoft-fork/serialize)[ Docs](https://github.com/sky-up/swoft-serialize)[ RSS](/packages/swoft-fork-serialize/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (1)

Data Serialize
==============

[](#data-serialize)

[![Latest Stable Version](https://camo.githubusercontent.com/ac2e7c1ea1238a8a5f7d90ff3454c9216dc2d1a0e1a799e4deda886fe9b0e1e8/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f73657269616c697a652e737667)](https://packagist.org/packages/swoft/serialize)[![Php Version](https://camo.githubusercontent.com/c197ef1e57a32c886b2a54d02ead7dbc035f18b3f39a642703b9372eef7819f9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e312d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://secure.php.net/)[![Library License](https://camo.githubusercontent.com/1c419f89412ea6c234c184ad6d85decb127c18584858d3707ae7d8e2131eccc4/68747470733a2f2f696d672e736869656c64732e696f2f686578706d2f6c2f706c75672e7376673f6d61784167653d32353932303030)](https://github.com/swoft-cloud/swoft-serialize/blob/master/LICENSE)[![Actions Status](https://github.com/swoft-cloud/swoft-serialize/workflows/Unit-tests/badge.svg)](https://github.com/swoft-cloud/swoft-serialize/actions)

Universal data serializer for PHP

Serializers:

- json(by `json_encode`)
- php(by `serialize`)
- igbinary(by extension `igbinary`)
- msgpack(by extension `msgpack`)

Install
-------

[](#install)

- composer command

```
composer require swoft-fork/serialize
```

Usage
-----

[](#usage)

```
$serializer = new JsonSerializer();
// $serializer = new PhpSerializer();
// $serializer = new IgBinarySerializer();
// $serializer = new MsgPackSerializer();

// serialize data
$string = $serializer->serialize($data);

// unserialize string
$data = $serializer->unserialize($string);
```

Unit testing
------------

[](#unit-testing)

```
phpunit
```

LICENSE
-------

[](#license)

The Component is open-sourced software licensed under the [Apache license](LICENSE).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

529d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bba312fac5f0d799df9e229d514d470468541f1d3ea9c7fae33ab390d5692d14?d=identicon)[sky-up](/maintainers/sky-up)

---

Top Contributors

[![inhere](https://avatars.githubusercontent.com/u/5302062?v=4)](https://github.com/inhere "inhere (25 commits)")[![huangzhhui](https://avatars.githubusercontent.com/u/12077148?v=4)](https://github.com/huangzhhui "huangzhhui (1 commits)")[![sky-up](https://avatars.githubusercontent.com/u/18524410?v=4)](https://github.com/sky-up "sky-up (1 commits)")

---

Tags

phplibrarytool

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/swoft-fork-serialize/health.svg)

```
[![Health](https://phpackages.com/badges/swoft-fork-serialize/health.svg)](https://phpackages.com/packages/swoft-fork-serialize)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
