python 编码文件json.loads json.dumps
import yaml d = {'name': '张三', 'age': '1'} print d jd = json.dumps(d, ensure_ascii=False, encoding='utf-8')) ud = json.loads(jd, encoding='utf-8') print ud ud = yaml.safe_load(jd, encoding='utf-8') print ud
posted on 2018-04-23 15:18 秦瑞It行程实录 阅读(...) 评论(...) 编辑 收藏