Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在编码 unicode 转义时遇到了问题。之后python manage.py dumpdata,我使用json了转义字符串。
python manage.py dumpdata
json
我需要获得可读的字符串,所以我尝试使用
json_data.decode("unicode_escape").encode("utf8")
但decode("unicode_escape")也解码符号等\n,\"当然我得到无效的json。
decode("unicode_escape")
\n
\"
我该如何解决?