post_string = {"body":{"AESpin":"","ak":"","akv":"","appVersion":20191211,uniKey":"ADRR+1588733683323x2i61T2K","vkey":""},"head":{"appVer":"20191211","osType":"ADR","osVer":"9","quickTrace":"508316","versionName":"5.1.5"}}
当json类型的post_string被传入request发送请求时, 双引号会自动转为单引号,服务端无法解析.
处理方式:
post_string = json.dumps(post_string)
然后再把post_string传入request,即可保持双引号不转换.
网友评论