protected function getNamespaceFromModuleJson($path)
    {
        $moduleProperties = $this->parseModuleJson($path);

        if (!isset($moduleProperties->module->namespace)) {
            throw new Exception('The namespace is not set in the module properties for the module in "' . $path . '".');
        }
        
        return Framework::prepareNamespace($moduleProperties->module->namespace);
    }