Json Notes
Apr 23rd, 2020 - Now
Json.load(s)
import json
with open('test.json', 'r') as f:
js_file = json.load(f)import json
js_file = json.loads("{"1":"first", "2":"second", "3":"third"}")Json.dumps
with open("courses.json", "w", encoding='utf-8') as f:
f.write(str(json.dumps(total_list, indent=4, ensure_ascii=False)))Last updated