PHPackages                             peterphp/json - 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. peterphp/json

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

peterphp/json
=============

PHP Library to encode and decode JSON

v1.0(6y ago)06MITPHPPHP &gt;=5.3.0

Since Dec 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jctml/peterphp)[ Packagist](https://packagist.org/packages/peterphp/json)[ RSS](/packages/peterphp-json/feed)WikiDiscussions master Synced 1w ago

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

使用方法：
=====

[](#使用方法)

1、引入autoload.php文 例如：

```
	require './vendor/autoload.php';

	$data = [
		"name"=>'peter',
		"email"=>"370237804@qq.com"
	];

	//返回JSON格式的数据
	\peterphp\Json::ext_json_encode($data);

	//解析JSON格式的数据
	Json::ext_json_decode

```

> 此方法解决JSON键无引号的问题;返回JSON格式的数据，直接带头application/json;charset=utf-8

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

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

2349d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/833756?v=4)[PeterTu](/maintainers/PeterTu)[@petertu](https://github.com/petertu)

---

Top Contributors

[![jctml](https://avatars.githubusercontent.com/u/15670363?v=4)](https://github.com/jctml "jctml (3 commits)")

### Embed Badge

![Health badge](/badges/peterphp-json/health.svg)

```
[![Health](https://phpackages.com/badges/peterphp-json/health.svg)](https://phpackages.com/packages/peterphp-json)
```

###  Alternatives

[sulu/form-bundle

Bundle for creating forms in Sulu.

87287.3k7](/packages/sulu-form-bundle)[doofinder/doofinder-magento2

Doofinder module for Magento 2

13204.0k1](/packages/doofinder-doofinder-magento2)

PHPackages © 2026

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