laurent@371: from pyjs.jsonrpc import JSONRPCServiceBase laurent@371: andrej@1736: laurent@371: class JSONRPCService(JSONRPCServiceBase): laurent@371: laurent@371: def serve(self): laurent@371: return self.process(request.body.read()) laurent@371: andrej@1740: def __call__(self, func): andrej@1742: self.methods[func.__name__] = func laurent@371: return func laurent@371: