PHPackages                             swoft/data-parser - 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. swoft/data-parser

ActiveLibrary

swoft/data-parser
=================

simple data parser tool library of the php

v1.0.1(8y ago)133.0k↓41.7%1Apache-2.0PHPPHP &gt;7.0.0

Since Apr 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/swoft-cloud/swoft-data-parser)[ Packagist](https://packagist.org/packages/swoft/data-parser)[ Docs](https://github.com/swoft-cloud/swoft-parser)[ RSS](/packages/swoft-data-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Data parser
===========

[](#data-parser)

Universal data parser/ for PHP

Driver:

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

Install
-------

[](#install)

- composer command

```
composer require swoft/data-parser
```

Usage
-----

[](#usage)

```
$parser = new JsonParser();
// $parser = new PhpParser();
// $parser = new MsgPackParser();

// encode
$encoded = $parser->encode($data);

// decode
$decoded = $parser->encode($encoded);
```

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

[](#unit-testing)

```
phpunit
```

LICENSE
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

2959d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2523931b3da00b736f7228ef9523aec5300b7ebead79a1460256cfc1a913fe5?d=identicon)[swoft](/maintainers/swoft)

---

Top Contributors

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

---

Tags

phpswoftphplibrarytool

### Embed Badge

![Health badge](/badges/swoft-data-parser/health.svg)

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

###  Alternatives

[toolkit/cli-utils

useful cli tool library of the php

20222.1k16](/packages/toolkit-cli-utils)

PHPackages © 2026

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