def json_qs_parser(body):
 try:
  return json.loads(body)
 except:
  pass
 try:
  return ElementTree.fromstring(body)
 except:
  pass
 return dict(parse.parse_qsl(body))

def json_qs_parser ( body ) : try : return json . loads ( body ) except : pass try : return ElementTree . fromstring ( body ) except : pass return dict ( parse . parse_qsl ( body ) )
parses response body from json .