2020
10-20
10-20
python Yaml、Json、Dict之间的转化
JsonToDictimportjsonjsonData='{"a":1,"b":2,"c":3,"d":4,"e":5}';print(jsonData)print(type(jsonData))text=json.loads(jsonData)print(text)print(type(text))#######################{"a":1,"b":2,"c":3,"d":4,"e":5}<class'str'>{'a':1,'b':2,'c':3,'d':4,'e':5}<class'dict'>DictToJsonimportjsontextDict={"a":1,"b":2,"c":3,"d":4,"e":5}print(textDict)print(type(textDict))#字典转化为jsontex...
继续阅读 >