To modify a JSON file, you need to load it, modify its data, and then save it. That is, you need to overwrite the existing file with the new data:
# Load
var f = File.new()
f.open("data.json", File.READ)
var json = JSON.parse(f.get_as_text())
f.close()
var data = json.result
# Modify
data["year"] = 2012
# Save
f = File.new()
f.open("data.json", File.WRITE)
f.store_string(JSON.print(data, " ", true))
f.close()