src/CI_Base_Model.php
public function serialize_row($row)
    {
        foreach ($this->callback_parameters as $column)
        {
            $row[$column] = serialize($row[$column]);
        }

        return $row;
    }
public function serialize_row($row)
    {
        foreach ($this->callback_parameters as $column)
        {
            $row[$column] = serialize($row[$column]);
        }

        return $row;
    }
Serialises data for you automatically, allowing you to pass
through objects and let it handle the serialisation in the background