Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python json open file

import json

#reading
with open(file_name, 'r') as f:
	data = json.load(f)

#writing
with open(file_name, 'w') as f:
	json.dump(data, f) #use indent to make easyer to read eg. indent = 4
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #python #json #open #file
ADD COMMENT
Topic
Name
2+7 =