PHPackages                             robertsaupe/php-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. robertsaupe/php-json

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

robertsaupe/php-json
====================

php library for json and jsonc parsing

1.0.4(2y ago)0341MITPHPPHP &gt;=8.2.0

Since May 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/robertsaupe/php-json)[ Packagist](https://packagist.org/packages/robertsaupe/php-json)[ Docs](https://github.com/robertsaupe/php-json)[ Fund](https://www.amazon.de/ref=as_li_ss_tl?ie=UTF8&linkCode=ll2&tag=robertsaupe-21&linkId=b79bc86cee906816af515980cb1db95e&language=de_DE)[ GitHub Sponsors](https://github.com/sponsors/robertsaupe)[ RSS](/packages/robertsaupe-php-json/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (6)Used By (1)

php-json
========

[](#php-json)

[![Minimum PHP version: 8.2](https://camo.githubusercontent.com/babc429305ce499eaa775877791b2e8ffdf6e6a17b2f839a6566e086aebe73f9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322532422d626c75652e7376673f636f6c6f723d626c7565267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/robertsaupe/php-json)[![Packagist Version](https://camo.githubusercontent.com/126f116a5def4db205587eb46b6a993f110a948b2d0592c4c651468bdd934a4b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6265727473617570652f7068702d6a736f6e3f636f6c6f723d626c7565267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/robertsaupe/php-json)[![Packagist Downloads](https://camo.githubusercontent.com/285eb7a8bf4b0ec66f5db42c12bcd701c2a8fd5feb1fbe74de27b47090050b1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6265727473617570652f7068702d6a736f6e3f636f6c6f723d626c7565267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/robertsaupe/php-json)[![License](https://camo.githubusercontent.com/31e62e0eff03ce9ddfdf69d8476340d4f541990bfb152cb02a0f342965252997/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](LICENSE)

php library for json and jsonc parsing

Supporting
----------

[](#supporting)

[GitHub](https://github.com/sponsors/robertsaupe) | [Patreon](https://www.patreon.com/robertsaupe) | [PayPal](https://www.paypal.com/donate?hosted_button_id=SQMRNY8YVPCZQ) | [Amazon](https://www.amazon.de/ref=as_li_ss_tl?ie=UTF8&linkCode=ll2&tag=robertsaupe-21&linkId=b79bc86cee906816af515980cb1db95e&language=de_DE)

Installing
----------

[](#installing)

```
composer require robertsaupe/php-json
```

Getting started
---------------

[](#getting-started)

### Json

[](#json)

```
use robertsaupe\Json\Json;

$json = new Json();
print_r($json->decodeFile('path_to_file.json'));
```

### Jsonc

[](#jsonc)

```
use robertsaupe\Json\Jsonc;

$jsonc = new Jsonc();
print_r($jsonc->decodeFile('path_to_file.jsonc'));
```

Credits
-------

[](#credits)

- [box-project/box](https://github.com/box-project/box) for basic Json parsing

    - Kevin Herrera
    - Théo Fidry
- Alexander Shostak  for decode commented json

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

Every ~158 days

Total

5

Last Release

864d ago

PHP version history (3 changes)1.0.0PHP ^8.0 || ^8.1

1.0.1PHP &gt;=8.0.0

1.0.4PHP &gt;=8.2.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/75934406?v=4)[Robert Saupe](/maintainers/robertsaupe)[@robertsaupe](https://github.com/robertsaupe)

---

Top Contributors

[![robertsaupe](https://avatars.githubusercontent.com/u/75934406?v=4)](https://github.com/robertsaupe "robertsaupe (16 commits)")

---

Tags

jsonjsonclibraryparsingphpphp8phpjsonlibraryparsingphp8jsonc

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.4k](/packages/infection-infection)[driftingly/rector-laravel

Rector upgrades rules for Laravel Framework

1.2k15.4M736](/packages/driftingly-rector-laravel)[veewee/xml

XML without worries

1837.0M39](/packages/veewee-xml)[wikimedia/parsoid

Parsoid, a bidirectional parser between wikitext and HTML5

187557.3k3](/packages/wikimedia-parsoid)[paycore/openfintech-data

Openfintech data

22110.1k](/packages/paycore-openfintech-data)

PHPackages © 2026

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