Retrieves a Drupal path or an absolute path and JSON decode the result.
string $path: Path to request AJAX from.
array $options: Array of options to pass to url().
array $headers: Array of headers. Eg array('Accept: application/vnd.drupal-ajax').
array Decoded json. Requests a Drupal path in JSON format, and JSON decodes the response.
protected function drupalGetJSON($path, array $options = array(), array $headers = array()) {
$headers[] = 'Accept: application/json';
return drupal_json_decode($this
->drupalGet($path, $options, $headers));
}