PHPackages                             sobernt/jq-object - 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. sobernt/jq-object

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

sobernt/jq-object
=================

1.0.0(6y ago)07MITPHPPHP ^7.2

Since Nov 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sobernt/jq-object)[ Packagist](https://packagist.org/packages/sobernt/jq-object)[ RSS](/packages/sobernt-jq-object/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (2)Used By (0)

**Install**

do install instructions for requrement package: **

install this package via composer:

`composer require sobernt/jq-object`

**Usage**

init object with minimal params:

```
$obj = new sobernt\JqObject\JqObject("{
    \"testkey\":\"testval\",
    \"testarray\":[
        \"testsimplearrayval1\",
        \"testsimplearrayval2\"
    ],
    \"testcompositearray\":[
        \"testcompositearrayval1\",
        {
             \"testcompositearray2key\": \"testcompositearray2value\"
        }
    ],
     \"testobject\":{
             \"testobjectkey\": \"testobjectval\",
             \"testobjectintkey\": \"1\"
    }
}");

```

full constructor:

`__construct(string $json,bool $is_formatted=true,$depth=0,$max_depth=255)`

set `$is_formated=false` for get all primitives as string. set `$max_depth = 500` for reconfigure object max recursion level = 500

throws `InstallJqException` if jq not installed

throws `JsonException` if json can't be parse

throws `JQException` on all other service errors\\php warnings in class.

you can use this as default object from json\_encode, but json parse by parts if you use this syntax:

```
$obj->testobject

```

this example return array:

```
$obj->testarray

```

this example returns object:

```
$obj->testcompositearray[1]

```

this example returns string if `$is_formated=false` else (int)1:

```
$obj->testobject->testobjectintkey

```

throws `InvalidArgumentException` if you call object not founded in json

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

2367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/737d13b447b58ec061d0570e59ec0d8ab0fe6747c2dd63d25015da763424f26f?d=identicon)[sobernt](/maintainers/sobernt)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/sobernt-jq-object/health.svg)

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

PHPackages © 2026

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