def _convertJSON(self): """ Convert a JSON result into a Python dict. This method can be overwritten in a subclass for a different conversion method. @return: converted result @rtype: Python dictionary """ return jsonlayer.decode(self.response.read())
def _convertJSON(self) : """ Convert a JSON result into a Python dict. This method can be overwritten in a subclass for a different conversion method. @return: converted result @rtype: Python dictionary """ return jsonlayer.decode(self.response.read())
def parse(self, source): return JSONResult(jsonlayer.decode(source.read()))
def parse(self, source): inp = source.read() if isinstance(inp, bytestype): inp = inp.decode('utf-8') return JSONResult(jsonlayer.decode(inp))