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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. swoft/data-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

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

simple data parser tool library of the php

v1.0.1(8y ago)133.1k↓85.4%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 today

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 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

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

3005d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12740176?v=4)[swoft](/maintainers/swoft)[@swoft](https://github.com/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

[norgul/xmpp-php

PHP library for XMPP.

4612.1k1](/packages/norgul-xmpp-php)[juststeveking/resume-php

A PHP library for building and working with the JSON resume schema.

1061.1k](/packages/juststeveking-resume-php)[bupy7/xml-constructor

The array-like constructor of XML document structure.

1339.5k](/packages/bupy7-xml-constructor)[leonelquinteros/php-toml

PHP parser for TOML language ( https://github.com/toml-lang/toml )

286.9k](/packages/leonelquinteros-php-toml)[phppkg/config

Config manage, load, get. Supports INI,JSON,YAML,NEON,PHP format file

133.5k](/packages/phppkg-config)

PHPackages © 2026

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