Beispiel #1
0
 def _deserialize_response(self, json_response_string,
                           protocol_response_class):
     self._protocol_bytes_received += len(json_response_string)
     self._logger.debug("response:{}".format(json_response_string))
     if not json_response_string:
         raise exceptions.EmptyResponseException()
     return protocol.fromJson(json_response_string, protocol_response_class)
Beispiel #2
0
 def _deserializeResponse(self, jsonResponseString, protocolResponseClass):
     self._protocolBytesReceived += len(jsonResponseString)
     self._logger.debug("response:{}".format(jsonResponseString))
     if jsonResponseString == '':
         raise exceptions.EmptyResponseException()
     responseObject = protocolResponseClass.fromJsonString(
         jsonResponseString)
     return responseObject
Beispiel #3
0
 def _deserializeResponse(self, response, protocolResponseClass):
     jsonResponseString = response.text
     self._updateBytesRead(jsonResponseString)
     self._debugResponse(jsonResponseString)
     if jsonResponseString == '':
         raise exceptions.EmptyResponseException()
     responseObject = protocolResponseClass.fromJsonString(
         jsonResponseString)
     return responseObject