def _callJsonRPC(self, auth, callrequests, returnreq=False, notimeout=False):
<EOL>auth = self._getAuth(auth)<EOL>jsonreq = {"<STR_LIT>": auth, "<STR_LIT>": callrequests}<EOL>if self.logrequests:<EOL><INDENT>self._loggedrequests.append(jsonreq)<EOL><DEDENT>body = json.dumps(jsonreq)<EOL>def handle_request_exception(exception):<EOL><INDENT>raise JsonRPCRequestException(<EOL>"<STR_LIT>" % str(exception))<EOL><DEDENT>body, response = self.onephttp.request('<STR_LIT:POST>',<EOL>self.url,<EOL>body,<EOL>self.headers,<EOL>exception_fn=handle_request_exception,<EOL>notimeout=notimeout)<EOL>def handle_response_exception(exception):<EOL><INDENT>raise JsonRPCResponseException(<EOL>"<STR_LIT>" % (type(exception), str(exception)))<EOL><DEDENT>try:<EOL><INDENT>res = json.loads(body)<EOL><DEDENT>except:<EOL><INDENT>ex = sys.exc_info()[<NUM_LIT:1>]<EOL>raise OnePlatformException(<EOL>"<STR_LIT>" % (body, ex))<EOL><DEDENT>if isinstance(res, dict) and '<STR_LIT:error>' in res:<EOL><INDENT>raise OnePlatformException(str(res['<STR_LIT:error>']))<EOL><DEDENT>if isinstance(res, list):<EOL><INDENT>ret = []<EOL>for r in res:<EOL><INDENT>request = None<EOL>for call in callrequests:<EOL><INDENT>if call['<STR_LIT:id>'] == r['<STR_LIT:id>']:<EOL><INDENT>request = call<EOL><DEDENT><DEDENT>if '<STR_LIT:status>' in r:<EOL><INDENT>if '<STR_LIT>' == r['<STR_LIT:status>']:<EOL><INDENT>if '<STR_LIT:result>' in r:<EOL><INDENT>ret.append((request, True, r['<STR_LIT:result>']))<EOL><DEDENT>else:<EOL><INDENT>ret.append((request, True, '<STR_LIT>'))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ret.append((request, False, r['<STR_LIT:status>']))<EOL><DEDENT><DEDENT>elif '<STR_LIT:error>' in r:<EOL><INDENT>raise OnePlatformException(str(r['<STR_LIT:error>']))<EOL><DEDENT><DEDENT>if returnreq:<EOL><INDENT>return ret<EOL><DEDENT>else:<EOL><INDENT>return ret[<NUM_LIT:0>][<NUM_LIT:1>:]<EOL><DEDENT><DEDENT>raise OneException("<STR_LIT>")<EOL>
Calls the Exosite One Platform RPC API.
            If returnreq is False, result is a tuple with this structure:
                (success (boolean), response)

            If returnreq is True, result is a list of tuples with
            this structure:
                (request, success, response)
            notimeout, if true, ignores reuseconnection setting, creating
            a new connection with no timeout.