添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
笑点低的啄木鸟  ·  通过 Apache Hive 和 ...·  11 小时前    · 
文雅的椅子  ·  安装Mujoco、mujoco-py、gym ...·  8 小时前    · 
坏坏的保温杯  ·  git rev-list ...·  8 月前    · 
阳刚的小狗  ·  numpy.where() in ...·  1 年前    · 
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")