分类:json
2020
11-10
2020
11-06
MySQL5.7.8中引入了json字段,这种类型的字段使用的频率比较低,但是在实际操作中,有些业务仍然在用,我们以此为例,介绍下json字段的操作方法:还是从例子看起:mysql>createtabletest1(idint,infojson);QueryOK,0rowsaffected(0.02sec)mysql>insertintotest1values(1,'{"name":"yeyz","age":26}'),(2,'{"name":"zhangsan","age":30}'),(3,'{"name":"lisi","age":35}');QueryOK,3rowsaffected...
继续阅读 >
2020
11-03
2020
10-28
2020
10-24
2020
10-20
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...
继续阅读 >
2020
10-10