Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create json list of object to file python

import json

aList = [{"a":54, "b":87}, {"c":81, "d":63}, {"e":17, "f":39}]
jsonString = json.dumps(aList)
jsonFile = open("data.json", "w")
jsonFile.write(jsonString)
jsonFile.close()
Source by pythonexamples.org #
 
PREVIOUS NEXT
Tagged: #create #json #list #object #file #python
ADD COMMENT
Topic
Name
7+1 =