protected function queryJson( $uri )
    {
        $response = $this->getHttpClient( $uri )
                         ->send();

        if ( $response->isOk() )
        {
            $headers = $response->getHeaders();

            if ( $headers->has( 'Content-Type' ) &&
                 preg_match( '#^(application|text)/(.*\+)?json(\s*;.*)?$#',
                             $headers->get( 'Content-Type' )->getFieldValue() ) )
            {
                return Json::decode( $response->getBody(), Json::TYPE_ARRAY );
            }
        }

        return null;
    }