'Parse display name, latitude, and longitude from an JSON response.'

def parse_json(self, page, exactly_one=True):

    if (not isinstance(page, basestring)):
        page = decode_page(page)
    resources = json.loads(page)
    statuscode = resources.get('info').get('statuscode')
    if (statuscode == 403):
        return 'Bad    API    Key'
    resources = resources.get('results')[0].get('locations')
    if (exactly_one and (len(resources) != 1)):
        from warnings import warn
        warn(("Didn't    find    exactly    one    resource!" + ('(Found    %d.),    use    exactly_one=False\n' % len(resources))))
    def parse_resource(resource):
        city = resource['adminArea5']
        county = resource['adminArea4']
        state = resource['adminArea3']
        country = resource['adminArea1']
        latLng = resource['latLng']
        (latitude, longitude) = (latLng.get('lat'), latLng.get('lng'))
        location = join_filter(',    ', [city, county, state, country])
        if (latitude and longitude):
            latitude = float(latitude)
            longitude = float(longitude)
        return (location, (latitude, longitude))
    if exactly_one:
        return parse_resource(resources[0])
    else:
        return [parse_resource(resource) for resource in resources]
