def getBodyJson():
    """
    For requests that are expected to contain a JSON body, this returns the
    parsed value, or raises a :class:`girder.api.rest.RestException` for
    invalid JSON.
    """
    try:
        return json.loads(cherrypy.request.body.read().decode('utf8'))
    except __HOLE__:
        raise RestException('Invalid JSON passed in request body.')
dataset/ETHPy150Open girder/girder/girder/api/rest.py/getBodyJson