Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

insert json file in python

a_dictionary = {"d": 4}

with open("sample_file.json", "r+") as file:
    data = json.load(file)	# get data from file
    update(a_dictionary)
    seek(0)
    json.dump(data, file)	# insert data in file
 
PREVIOUS NEXT
Tagged: #insert #json #file #python
ADD COMMENT
Topic
Name
4+7 =