def get_json(url):
    "\n    uses requests to GET and return deserialized json\n\n    uses anyjson if the Response object doesn't have .json()\n\n    :param url: the URL to get\n    :type url: string\n    :rtype: dict/mixed or None\n    :returns: unserialized JSON, or None\n    "
    r = requests.get(url)
    if ('json' in dir(r)):
        return r.json()
    try:
        j = anyjson.deserialize(r.content)
        return j
    except:
        logger.error('could not deserialize JSON for {u} (got status code {s})'.format(s=r.status_code, u=url))
        return None
uses requests to GET and return deserialized json

uses anyjson if the Response object doesn't have .json()

:param url: the URL to get
:type url: string
:rtype: dict/mixed or None
:returns: unserialized JSON, or None
def get_json(url):
    "\n    uses requests to GET and return deserialized json\n\n    uses anyjson if the Response object doesn't have .json()\n\n    :param url: the URL to get\n    :type url: string\n    :rtype: dict/mixed or None\n    :returns: unserialized JSON, or None\n    "
    r = requests.get(url)
    if ('json' in dir(r)):
        return r.json()
    try:
        j = anyjson.deserialize(r.content)
        return j
    except:
        logger.error('could not deserialize JSON for {u} (got status code {s})'.format(s=r.status_code, u=url))
        return None