import json


def extract_json_from_response(resp):
    """gets and decode http jsonrespose to python equivalents

    Parameters
    ---------
    resp : URLRespose
        HTTP respomnse from test client

    Returns
    -------
    obj
        containing python equivalent of json reponse

    Raises
    ------
    json.JSONException
        if the respose cannot be json decode
    """
    resp_data = resp.data.decode(resp.charset)
    return json.loads(resp_data)