aiohttp_jrpc/__init__.py
def decode(request):
    """ Get/decode/validate json from request """
    try:
        data = yield from request.json(loader=json.loads)
    except Exception as err:
        raise ParseError(err)

    try:
        validate(data, REQ_JSONRPC20)
    except ValidationError as err:
        raise InvalidRequest(err)
    except SchemaError as err:
        raise InternalError(err)
    except Exception as err:
        raise InternalError(err)
    return data
def decode(request):
    """ Get/decode/validate json from request """
    try:
        data = yield from request.json(loader=json.loads)
    except Exception as err:
        raise ParseError(err)

    try:
        validate(data, REQ_JSONRPC20)
    except ValidationError as err:
        raise InvalidRequest(err)
    except SchemaError as err:
        raise InternalError(err)
    except Exception as err:
        raise InternalError(err)
    return data
Get/decode/validate json from request