Exemple #1
0
 def parse_error(self, result):
     return json.loads(result)['error']
Exemple #2
0
 def parse_response(self, result, headers):
     try:
         result = json.loads(result or '{}')
     except:
         raise APIFormatError('Unable to process JSON data: %s' % str(result)[:200])
     return result