public function autoEncodeAttributes()
    {
        foreach ($this->attributes as $name) {
            if (!isset($this->owner->getDirtyAttributes()[$name])) {
                continue;
            }
            
            $value = $this->owner->{$name};
            
            if (is_array($value)) {
                $this->owner->{$name} = $this->jsonEncode($name);
            }
        }
    }