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

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

codedgr/json
============

JSON helper library

1.0.1(7y ago)027MITPHPPHP &gt;=7.1.0

Since May 26Pushed 7y agoCompare

[ Source](https://github.com/codedgr/JSON)[ Packagist](https://packagist.org/packages/codedgr/json)[ Docs](https://github.com/codedgr/JSON)[ RSS](/packages/codedgr-json/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

JSON Helper Library
===================

[](#json-helper-library)

This library throws an exception every time a json encode/decode action fails.

Install
-------

[](#install)

Using Composer

```
"require": {
    "codedgr/json": "~1.0"
}

```

Usage
-----

[](#usage)

Define an array

```
$array = [
    'first-element' => 'this value',
    'second-element' => [0,1,2,3,4],
];

```

Then use the `encode` and `decode` functions surrounded with try/catch

```
try{
    $encodedJSON = JSON::encode($array);
    $object = JSON::decode($encodedJSON);
}catch (JSONException $e){
    echo $e->getMessage();
}

```

Requirements
------------

[](#requirements)

- PHP 7.1 or above

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community2

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

Total

2

Last Release

2911d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fabb412180db5250724ef8144d5fb430864b5398362f54397f2ad0bc72c0ec3?d=identicon)[codedgr](/maintainers/codedgr)

---

Tags

json

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[justinrainbow/json-schema

A library to validate a json schema.

3.6k316.9M612](/packages/justinrainbow-json-schema)[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[colinodell/json5

UTF-8 compatible JSON5 parser for PHP

30422.2M45](/packages/colinodell-json5)[clue/ndjson-react

Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.

15267.7M16](/packages/clue-ndjson-react)

PHPackages © 2026

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