private function _toJson($data)
    {
        if ($data) {
            if (is_array($data)) {
                return json_encode($this->_toCleanArray($data));
            }

            return json_encode($data);
        }
    }
private function _toJson($data)
    {
        if ($data) {
            if (is_array($data)) {
                return json_encode($this->_toCleanArray($data));
            }

            return json_encode($data);
        }
    }
private function _toJson ( $ data ) { if ( $ data ) { if ( is_array ( $ data ) ) { return json_encode ( $ this -> _toCleanArray ( $ data ) ) ; } return json_encode ( $ data ) ; } }
Converts data types for storage

@param mixed $data
@return string
Converts data types for storage