Пример #1
0
 def parse_error(self, result):
     return json.loads(result)['error']
Пример #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