PHPackages                             jc-it/yii2-json-behavior - 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. jc-it/yii2-json-behavior

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

jc-it/yii2-json-behavior
========================

JSON behavior for Yii2 that adds magic attributes. Ideal for single table inheritance.

v1.0.0(6y ago)0206MITPHPPHP &gt;=7.1.0

Since Jul 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/JC-IT/yii2-json-behavior)[ Packagist](https://packagist.org/packages/jc-it/yii2-json-behavior)[ RSS](/packages/jc-it-yii2-json-behavior/feed)WikiDiscussions master Synced today

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

JSON behavior for Yii2
======================

[](#json-behavior-for-yii2)

This extension provides a package that implements magic getters and setters based on a list of configured attributes. Ideal for single table inheritance.

```
$ composer require jc-it/yii2-json-behavior
```

or add

```
"jc-it/yii2-json-behavior": "^"

```

to the `require` section of your `composer.json` file.

Configuration
-------------

[](#configuration)

In a model:

```
/**
 * @return array
 */
public function behaviors(): array
{
    return ArrayHelper::merge(
        parent::behaviors(),
        [
            JsonConfigurationBehavior::class => [
                'class' => JsonConfigurationBehavior::class,
                'jsonAttributes' => [
                    '' => [
                        '' => ''
                        '' => ''
                    ],
                    '' => [
                        '' => ''
                        '' => ''
                    ]
                ]
            ],
        ]
    );
}
```

Credits
-------

[](#credits)

- [Joey Claessen](https://github.com/joester89)

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](https://github.com/jc-it/yii2-json-configuration-behavior/blob/master/LICENSE) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

2496d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88359ebe0456645a614e563dfbf0dd025b69ef57221050cb9eb31e3eef4dd0f9?d=identicon)[joester89](/maintainers/joester89)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/jc-it-yii2-json-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/jc-it-yii2-json-behavior/health.svg)](https://phpackages.com/packages/jc-it-yii2-json-behavior)
```

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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