private function convertSerializedToObjects($data)
    {
        $data = @unserialize($data);

        // If it is an object then
        // we can just return it...
        if (is_object($data))
        {
            return $data;
        }

        // It could be a associative array so use
        // JSON to encode it and then decode it properly...
        if (is_array($data) and $json = $this->convertToJson($data))
        {
            return $this->convertJsonToObjects($json);
        }

        return null;
    }