Answers for "# read the JSON file and also print the file content in JSON format."

0

# read the JSON file and also print the file content in JSON format.

# read the JSON file and also print the file content in JSON format.
with open(filename, 'r') as f:
  d = json.load(f)
  print(json.dumps(d, indent=2))
Posted by: Guest on March-30-2022

Python Answers by Framework

Browse Popular Code Answers by Language