1import json
2
3with open("data.json", "r") as json_file:
4 my_dict = json.load(json_file)
1import json
2
3# Data to be written
4dictionary ={
5 "id": "04",
6 "name": "sunil",
7 "depatment": "HR"
8}
9
10# Serializing json
11json_object = json.dumps(dictionary, indent = 4)
12print(json_object)
13