PHPackages                             davidfricker/cleanjson - 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. davidfricker/cleanjson

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

davidfricker/cleanjson
======================

A simple wrapper around PHP's Json functions giving a simple approach to error checking on decode.

1.1(9y ago)2551[1 issues](https://github.com/DavidFricker/CleanJson/issues)MITPHPPHP ^5.3.3 || ^7.0

Since Feb 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/DavidFricker/CleanJson)[ Packagist](https://packagist.org/packages/davidfricker/cleanjson)[ RSS](/packages/davidfricker-cleanjson/feed)WikiDiscussions master Synced 1mo ago

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

CleanJson
=========

[](#cleanjson)

A simple wrapper around PHP's JSON functions giving a simple approach to error checking on decode.

Example
-------

[](#example)

All methods are static so an example useage would be as follows:

```

```

Why
---

[](#why)

This class is a simple wrapper around PHP's JSON functions. It aims to make error detection and parsing simpler than it currently is. For example the `decode` method decodes a JSON string and returns the resulting object/array. If the decode operation fails the wrapper function will return FALSE, unlike the default implementation which returns NULL. The issue here being that a valid JSON string can be decoded and result in NULL also. This is not always desireable.

License
-------

[](#license)

Released under the MIT license.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~6 days

Total

2

Last Release

3373d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b261da4583f1c88fcf9d392ba06c680083a0420c077ce954ec8d0c20d4f398c?d=identicon)[sousdev](/maintainers/sousdev)

---

Tags

decoderjsonjson-stringwrapper

### Embed Badge

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

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

###  Alternatives

[stuttter/wp-user-profiles

A sophisticated way to edit users in WordPress

11219.3k1](/packages/stuttter-wp-user-profiles)[fof/analytics

Tracks analytics using Google Analytics, Google Optimize/GTM and Matomo

3543.1k](/packages/fof-analytics)[malarzm/collections

Various implementations of Doctrine's Collection interface

2368.1k](/packages/malarzm-collections)[chrico/wp-fields

Package which provides some re-usable fields for WordPress.

1981.2k](/packages/chrico-wp-fields)[aertmann/history

An improved history backend module for Neos

1070.2k](/packages/aertmann-history)

PHPackages © 2026

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