public function fetchJSON($url, $followRedirects = true, $username = null, $password = null, $headers = array())
    {
        $contents = $this->fetchURL($url, $followRedirects, $username, $password, $headers);
        return JSONUtils::decode($contents,true);
    }
public function fetchJSON($url, $followRedirects = true, $username = null, $password = null, $headers = array())
    {
        $contents = $this->fetchURL($url, $followRedirects, $username, $password, $headers);
        return JSONUtils::decode($contents,true);
    }
public function fetchJSON ( $ url , $ followRedirects = true , $ username = null , $ password = null , $ headers = array ( ) ) { $ contents = $ this -> fetchURL ( $ url , $ followRedirects , $ username , $ password , $ headers ) ; return JSONUtils :: decode ( $ contents , true ) ; }
Fetch the contents of a URL as a JSON array

@param string $url Fully-qualified URL to request
@param bool   $followRedirects If true, follow redirects to default max of 5
@param string $username Username to use in http authentication header
@param string $password Password to use in http authentication header
@param array  $headers  Array of http headers to append to the existing headers list

@return array PHP array version of JSON contents
@throws HttpRequestException If contents cannot be fetched
Fetch the contents of a URL as a JSON array