base64.b64decode这个函数的字符类型是什么?

0
在python2.7中打印输出是字符串
代码:python生成JSON串 然后编码 再解码 转换成字典
a={'responseErrorMsg' : 'Request error',
   'responseResult' : 'Failed'}
b=json.dumps(a)
c=base64.b64encode(b)
d=base64.b64decode(c)
e=json.loads(b)

print b
print c
print e
print e['responseErrorMsg']
print type(c)

在自动化脚本中,函数返回 rly_msg为编码后的jason串,解压时报错是字符串,没有需要解码的jason串
json_zip = re.findall(r"{(.*)}", rly_msg)
        json_decode=base64.b64decode(json_zip[0])
已邀请:

要回复问题请先登录注册