python 字典类型中中文不转为unicode格式,将unicode字典字典转换为python中的字典

I have unicode u"{code1:1,code2:1}" and I want it in dictionary format.I want it in {code1:1,code2:1} format.I tried unicodedata.normalize(NFKD, my_data).encode(ascii,ignore) but it returns string not dictionary.Can anyone help me?解决方案You ca…

python 字典类型中中文不转为unicode格式_将unicode字典字典转换为python中的字典

I have unicode u"{code1:1,code2:1}" and I want it in dictionary format.I want it in {code1:1,code2:1} format.I tried unicodedata.normalize(NFKD, my_data).encode(ascii,ignore) but it returns string not dictionary.Can anyone help me?解决方案You ca…