Answers for "get json data python"

0

get json data python

import json

# Load json data
with open("example.json", "r") as file:
  json.load(file)
  
# Save dict to json
with open("example2.json", "w") as file:
  data = {"numbers": [1,2,3]}
  json.dump(data, file, indent=2)
Posted by: Guest on July-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language