'Returns location, (latitude, longitude) from json feed.'

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

    if (not isinstance(page, basestring)):
        page = util.decode_page(page)
    self.doc = json.loads(page)
    places = self.doc.get('results', [])
    if (not places):
        check_status(self.doc.get('status'))
        return None
    elif (exactly_one and (len(places) != 1)):
        raise ValueError(("Didn't    find    exactly    one    placemark!    (Found    %d)" % len(places)))
    def parse_place(place):
        'Get    the    location,    lat,    lng    from    a    single    json    place.'
        location = place.get('formatted_address')
        latitude = place['geometry']['location']['lat']
        longitude = place['geometry']['location']['lng']
        return (location, (latitude, longitude))
    if exactly_one:
        return parse_place(places[0])
    else:
        return [parse_place(place) for place in places]
