PHPackages                             eugene-melbourne/json-encoder-decoder - 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. eugene-melbourne/json-encoder-decoder

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

eugene-melbourne/json-encoder-decoder
=====================================

Encodes and Decodes JSON strings

1.0.6(4y ago)02.3kMITPHPPHP &gt;=7.1

Since Aug 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Eugene-Melbourne/json-encoder-decoder)[ Packagist](https://packagist.org/packages/eugene-melbourne/json-encoder-decoder)[ RSS](/packages/eugene-melbourne-json-encoder-decoder/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (5)Dependencies (2)Versions (7)Used By (0)

JsonEncoderDecoder
==================

[](#jsonencoderdecoder)

Encodes and Decodes JSON strings

Installation

```
$ composer require  eugene-melbourne/json-encoder-decoder

```

Most importantly it has default parameters pre-set

- JSON\_THROW\_ON\_ERROR
- convertEmptyStringToNull
- ReturnAsAssociative

It can be changed though.

Also, it can ConvertEmptyStringToNull and has unit tests to see it in action.

Example:

```
// Example 1
$val = (new JsonEncoderDecoder())->json_encode(null)
// $val = null

// Example 2
$val  = [chr(160),];
$json = (new JsonEncoderDecoder())->json_encode($val);
// throws JsonException

// Example 3
$val  = [chr(160),];
$json = (new JsonEncoderDecoder())
        ->addOption(JSON_INVALID_UTF8_SUBSTITUTE)
        ->json_encode($val);
// $json = '["\ufffd"]';

```

See more examples in unit tests.

P.S. The char code `160` would be `&nbsp;`

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Total

6

Last Release

1768d ago

PHP version history (3 changes)1.0.0PHP &gt;=7.0

1.0.2PHP &gt;=7.4

1.0.4PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/25052d78dedcd322977be1cb577b2fb6440c8318a4b5f472687c22fecae1ab4e?d=identicon)[Eugene-Melbourne](/maintainers/Eugene-Melbourne)

---

Top Contributors

[![Eugene-Melbourne](https://avatars.githubusercontent.com/u/37518271?v=4)](https://github.com/Eugene-Melbourne "Eugene-Melbourne (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eugene-melbourne-json-encoder-decoder/health.svg)

```
[![Health](https://phpackages.com/badges/eugene-melbourne-json-encoder-decoder/health.svg)](https://phpackages.com/packages/eugene-melbourne-json-encoder-decoder)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)[symfony/web-profiler-bundle

Provides a development tool that gives detailed information about the execution of any request

2.3k160.5M1.2k](/packages/symfony-web-profiler-bundle)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k78.3k91](/packages/pocketmine-pocketmine-mp)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)

PHPackages © 2026

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