Answers for "python write .json file"

12

open json file python

import json

with open('data.txt') as json_file:
    data = json.load(json_file)
Posted by: Guest on March-02-2020
2

save json to file

import json

data = {}

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

Python Answers by Framework

Browse Popular Code Answers by Language