Created
July 19, 2020 15:43
-
-
Save SurendraTamang/95a741f64946cdf19308e2bb4f8c257b to your computer and use it in GitHub Desktop.
This gist is for updating the json file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open(self.outputfile, 'r+', encoding="utf-8") as json_file: | |
load_json_file = json.load(json_file) | |
load_json_file['link_list'].append(updated_data) | |
json_file.seek(0) | |
json_file.write(json.dumps( | |
load_json_file, indent=2, ensure_ascii=False)) | |
json_file.truncate() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment