Answers for "how to add items to an existing json file python"

0

how to add items to an existing json file python

a_dictionary = {"d": 4}

with open("sample_file.json", "r+") as file:
    data = json.load(file)
    update(a_dictionary)
    seek(0)
    dump(data, file)
Posted by: Guest on October-29-2020

Code answers related to "how to add items to an existing json file python"

Code answers related to "Javascript"

Browse Popular Code Answers by Language