json.loads pk json.dumps

xiaoxiao2021-02-28  135

json.loads(str) 加载 加载string ,把string转化成dictjson.dumps(dict) 卸货 卸货成string,把dict转化成string python import json dict_ = {1:2, 3:4, "55":"66"} #test json.dumps print type(dict_), dict json_str=json.dumps(dict_) print type(json_str), json_str #test json.loads dict_2=json.loads(json_str) print type(dict_2), dict_2

运行结果:

转载请注明原文地址: https://www.6miu.com/read-33374.html

最新回复(0)