Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert a python object and store it in a JSON file in the local system

# convert a python object and store it in a JSON file in the local system
import json
data = {
    "id": "123",
    "name": "John Doe",
    "occupation": "Farmer"
}
with open("output_file.json", "w") as file:
    json.dump(data, file)
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #convert #python #object #store #JSON #file #local #system
ADD COMMENT
Topic
Name
7+7 =