def get_json(environ):
    '''
    Return the request body as JSON
    '''
    content_type = environ.get('CONTENT_TYPE', '')
    if content_type != 'application/json':
        raise HTTPError(406, 'JSON required')

    try:
        return json.loads(read_body(environ))
    except __HOLE__ as exc:
        raise HTTPError(400, exc)
dataset/ETHPy150Open saltstack/salt/salt/netapi/rest_wsgi.py/get_json