摘要:
1 import json 2 import sys 3 def saveToJSON(filename,dicObject): 4 flag = False 5 if type(dicObject) != dict: 6 return flag 7 try: 8 j_file = open(fil 阅读全文
摘要:
` import json p_d = {'Tom':29,'Jack':20,'Jim':12} 定义字典对象p_d print(p_d) {'Tom': 29, 'Jack': 20, 'Jim': 12} p_to_j = json.dumps(p_d) print(p_to_j) '{"To 阅读全文