protected function loadJson(string $json): array
    {
        $json = preg_replace('#^\s*//.*$\v?#mx', '', $json);
        $configuration = json_decode($json, true);

        if (!is_array($configuration)) {
            throw new ConfigException('Not a valid JSON data');
        }

        return $configuration;
    }