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;
    }
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;
    }
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 ; }
Load JSON data.

@param string $json

@return array
@throws \Berlioz\Config\Exception\ConfigException
Load JSON data .