添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
耍酷的芹菜  ·  [Python] async def & ...·  2 周前    · 
乐观的竹笋  ·  如何快速上手MuJoCo ...·  6 天前    · 
着急的跑步鞋  ·  Python ...·  2 天前    · 
年轻有为的海龟  ·  使用Python ...·  昨天    · 
大鼻子的海龟  ·  jq ...·  1 年前    · 
叛逆的脸盆  ·  python lambda if else ...·  2 年前    · 
没有腹肌的墨镜  ·  set | Microsoft Learn·  2 年前    · 
import json def process_json(input_json_file, output_json_file): file_in = open(input_json_file, "r") file_out = open(output_json_file, "w") # load数据到变量json_data json_data = json.load(file_in) print json_data print "after update --->" print type(json_data) # 修改json中的数据 json_data["job"] = "hahah" print json_data # 将修改后的数据写回文件 file_out.write(json.dumps(json_data)) file_in.close() file_out.close() process_json("../jsonfile/mysql2hive_templet.json","../jsonfile/mysql2hive_instance.json")