save content in json file