Answers for "python create json from file"

8

save json file python

with open('data.txt', 'w') as outfile:
    json.dump(data, outfile)
Posted by: Guest on July-28-2020
0

write json to file python

# to write on file
# data_dict is a dictionary

import json
        
with open('data.json', 'w') as f:
	json.dump(data_dict, f)
Posted by: Guest on January-27-2021

Code answers related to "python create json from file"

Code answers related to "Javascript"

Browse Popular Code Answers by Language