我有这个数据:
bytesObj = b'{"a":1,"b":"test","c":"\xfc\\\\\xba\xda\\n123"}'
tmpStr = bytesObj.decode('gb18030','ignore')
tmpStr
{"a":1,"b":"test","c":"黒\\黑\\n123"}
我有什么尝试:
import re
b = re.sub(r'\\', '', tmpStr)
然后我得到:
{"a":1,"b":"test","c":"黒黑n123"}
我的预期输出:
{"a":1,"b":"test","c":"黒黑\n123"}
你能帮我吗?
慕码人2483693
慕斯王
相关分类