code: def _load_json_file_or_url(self, json_path_or_url):
          '''Return the JSON at the local path or URL as a dict
  
          This method raises DataPackageRegistryException if there were any
          errors.
          '''
          try:
              if os.path.isfile(json_path_or_url):
                  with open(json_path_or_url, 'r') as f:
                      result = json.load(f)
              else:
                  res = requests.get(json_path_or_url)
                  res.raise_for_status()
                  result = res.json()
  
              return result
  
          except (ValueError,
                  requests.exceptions.RequestException) as e:
              six.raise_from(DataPackageRegistryException(e), ef _load_json_file_or_url(self, json_path_or_url):
          '''Return the JSON at the local path or URL as a dict
  
          This method raises DataPackageRegistryException if there were any
          errors.
          '''
          try:
              if os.path.isfile(json_path_or_url):
                  with open(json_path_or_url, 'r') as f:
                      result = json.load(f)
              else:
                  res = requests.get(json_path_or_url)
                  res.raise_for_status()
                  result = res.json()
  
              return result
  
          except (ValueError,
                  requests.exceptions.RequestException) as e:
              six.raise_from(DataPackageRegistryException(e), e)
docs: Return the JSON at the local path or URL as a dict
  
          This method raises DataPackageRegistryException if there were any
          errors.