human
Complete the below
def get_layer(request, layername):

    ''''Get Layer object as JSON'
    '''
 ... Can you provide a the Python program you requested?
assistant
#Here is the Python program you requested.
    def decimal_default(obj):
        if isinstance(obj, decimal.Decimal):
            return float(obj)
        raise TypeError
    logger.debug('Call    get    layer')
    if (request.method == 'GET'):
        layer_obj = _resolve_layer(request, layername)
        logger.debug(layername)
        response = {'typename': layername, 'name': layer_obj.name, 'title': layer_obj.title, 'url': layer_obj.get_tiles_url(), 'bbox_string': layer_obj.bbox_string, 'bbox_x0': layer_obj.bbox_x0, 'bbox_x1': layer_obj.bbox_x1, 'bbox_y0': layer_obj.bbox_y0, 'bbox_y1': layer_obj.bbox_y1}
        return HttpResponse(json.dumps(response, ensure_ascii=False, default=decimal_default), content_type='application/javascript')