添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
叛逆的洋葱  ·  python 新环境的创建并在 ...·  7 小时前    · 
重情义的毛巾  ·  Anaconda使用 | zdaiot·  7 小时前    · 
无邪的木瓜  ·  Installation | Python ...·  1小时前    · 
难过的炒饭  ·  正则 test() ...·  10 月前    · 
严肃的围巾  ·  【hive】count() ...·  1 年前    · 
严肃的枕头  ·  使用 DateTimePicker ...·  1 年前    · 
玩足球的闹钟  ·  How to use original ...·  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")