# Path: gocdapi/custom_exceptions.py
# class GoCdApiException(Exception):
#     """
#     Base class for all errors
#     """
#     pass


import logging
import requests
from json import loads as jsonloads
from urlparse import urljoin
from gocdapi.custom_exceptions import GoCdApiException
        """
        return urljoin(self.go_server.baseurl, path)

    @staticmethod
    def get_json_data(url, params=None):
        """Get the json data from a GET request

        Args:
            url (str): url to get the json data
            params (dict): params to be passed through the GET request

        Returns:
            str: json string from the response of the request

        Raises:
            GoCdApiException: when the response can't be parsed as a json string
        """

        try:
            response = GoBase.get_full_response(url, params)
            return response.json()
        except ValueError:
            logging.exception('Inappropriate content found at %s', url)
            raise GoCdApiException('Cannot parse %s' % response.text)

    @staticmethod
    def load_json_data(json_str):
        try:
            return jsonloads(json_str)
        except ValueError:

# Path: gocdapi/custom_exceptions.py
# class GoCdApiException(Exception):
#     """
#     Base class for all errors
#     """
#     pass


# Path: gocdapi/gobase.py
import logging
import requests
from json import loads as jsonloads
from urlparse import urljoin
from gocdapi.custom_exceptions import GoCdApiException

        """
        return urljoin(self.go_server.baseurl, path)

    @staticmethod
    def get_json_data(url, params=None):
        """Get the json data from a GET request

        Args:
            url (str): url to get the json data
            params (dict): params to be passed through the GET request

        Returns:
            str: json string from the response of the request

        Raises:
            GoCdApiException: when the response can't be parsed as a json string
        """

        try:
            response = GoBase.get_full_response(url, params)
            return response.json()
        except ValueError:
            logging.exception('Inappropriate content found at %s', url)
            raise GoCdApiException('Cannot parse %s' % response.text)

    @staticmethod
    def load_json_data(json_str):
        try:
            return jsonloads(json_str)
        except ValueError:

            raise GoCdApiException('Cannot parse %s' % json_str)