PHPackages                             xakki/yii2-ar-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. xakki/yii2-ar-json

ActiveYii2-extension[Parsing &amp; Serialization](/categories/parsing)

xakki/yii2-ar-json
==================

ActiveRecord json field

v0.2(7y ago)24GPL-3.0-or-laterPHP

Since Feb 5Pushed 7y ago2 watchersCompare

[ Source](https://github.com/Xakki/yii2-ar-json)[ Packagist](https://packagist.org/packages/xakki/yii2-ar-json)[ RSS](/packages/xakki-yii2-ar-json/feed)WikiDiscussions master Synced today

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

One field for all
=================

[](#one-field-for-all)

Combine some field into json field ActiveRecord

`composer require xakki/yii2-ar-json`

This table has only field - `id`, `create`, `option`The `option` is a json filed (for PostgreSQL is a jsonb)

```
/**
 * Example class
 * @property integer $id
 * @property string $create
 * @property string $text
 * @property array $data
 */
class Example extends \xakki\yii2-ar-json\components\ActiveRecordJson
{
    protected $_json_attribute = 'option';
    protected $_json_catch = ['text', 'data', 'info'];

    public static function tableName()
    {
        return '{{example}}';
    }

    /**
    * For new record only
    */
    public function setAttributeDefault() {
        $this->text = 'Example text';
        $this->data = ['test'];
        $this->info = 2
    }

    public static function doSomeThing() {
        $thisData = self::findOne(1);
        echo $thisData->text;
        print_r($thisData->data);
    }

}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

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

2

Last Release

2653d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/426468?v=4)[Xakki](/maintainers/Xakki)[@Xakki](https://github.com/Xakki)

---

Top Contributors

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

---

Tags

jsonyii2activerecord

### Embed Badge

![Health badge](/badges/xakki-yii2-ar-json/health.svg)

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

###  Alternatives

[kdn/yii2-json-editor

JSON editor widget (josdejong/jsoneditor) for Yii 2.

22570.0k3](/packages/kdn-yii2-json-editor)[cranetm/yii2-json-rpc-2.0

JSON RPC 2.0 for Yii2 strict type validation of request and response data

2679.6k1](/packages/cranetm-yii2-json-rpc-20)[nizsheanez/yii2-json-rpc

A lightweight JsonRpc Server and Client for PHP

2034.0k](/packages/nizsheanez-yii2-json-rpc)[devgroup/yii2-jsoneditor

Yii2 jsoneditor widget

1199.6k1](/packages/devgroup-yii2-jsoneditor)

PHPackages © 2026

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