PHPackages                             jsonplus/jsonplus - 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. jsonplus/jsonplus

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

jsonplus/jsonplus
=================

A way to add a plus to your JSON

v1.1.0(4y ago)0413apache-2.0PHPPHP ^5.5 || ^7.0

Since May 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/JSONplus/JSONplus)[ Packagist](https://packagist.org/packages/jsonplus/jsonplus)[ RSS](/packages/jsonplus-jsonplus/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (8)Used By (3)

JSONplus
========

[](#jsonplus)

This library is meant to be upgrade against the standard PHP function `json_encode()` and `json_decode()`.

By its design `\JSONplus::encode()` and `\JSONplus::decode()` is similar. It ensures the extensions — the *plus* in *JSONplus* — to integrate:

- PrettyPrinting, and print-fixes like `\/` and e.g. replacing your `"true"` to the boolean `true`.
- ignoring comments, but allowing them to be in your *json*-file
- datalists, for the ease of reusing data
- negative keys in your array
- error handling

We added more static functions:

- `\JSONplus::open()` is the filehandeling alternative to `\JSONplus::decode()`
- `\JSONplus::save()` is the filehandeling alternative to `\JSONplus::encode()`
- `\JSONplus::create()` gives an JSONplus object
- `\JSONplus::pointer()` lets you substract data by path
- `\JSONplus::is()` is a pattern-matcher. It reads its input, and results in a boolean, depending on the rules. It plays well on the levels of data-integrity `\JSONplus::decode()` and `\JSONplus::uncode()` require. It can also test the integrity of an JSONplus object. It combines the `->match()` and `->validate()` depending the rules provided.
- `\JSONplus::uncode()` is a selective reader. Compared to `::decode()` it looses data. Used in parsers based upon JSONplus.
- `\JSONplus::recode()` is a selective writer. Compared to `::encode()` it looses data. Used in parsers based upon JSONplus.
- `\JSONplus::worker()` helps gathering the variables passed-through by a bash script like `php -f script.php` and `cat my.json | php -f script.php`.

But its real strength comes by `new JSONplus()`. This object encapsules the data and enables additional functionality:

- `->import()` and `->import_file()`
- `->export()` and `->export_file()`
- `->load()` replaces the dataset, while `->merge()` combines with the existing dataset.
- `->getByPath()` and `->getByID()` helps you navigate the dataset.
- `->match()` is the non-static alternative of `\JSONplus::is()`
- `->validate()` checks the dataset against its schema. NOTE: requires the [JSONplus-schema](https://github.com/JSONplus/schema) extension.
- `->analyse()` is a selective reader.
- `->process()` is a selective writer.

Additional to JSONplus we will provide [extensions](https://github.com/JSONplus/) to handle other data-structures then *json*. We provide the data-mapping. You access the data.

[![JSONplus model](JSONplus-model.png)](JSONplus-model.png)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

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

Every ~97 days

Recently: every ~145 days

Total

7

Last Release

1657d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16780798?v=4)[XLtrace](/maintainers/xltrace)[@xltrace](https://github.com/xltrace)

---

Top Contributors

[![sentfanwyaerda](https://avatars.githubusercontent.com/u/3115395?v=4)](https://github.com/sentfanwyaerda "sentfanwyaerda (12 commits)")

### Embed Badge

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

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

###  Alternatives

[comcast/php-legal-licenses

A utility to generate a Licenses file containing the full license text for every dependency in your project for legal purposes.

801.2M9](/packages/comcast-php-legal-licenses)

PHPackages © 2026

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