Answers for "what is json.loads python"

0

json load python

import json

with open('jsonfile.json', 'r') as f:
	data = json.load(f)
Posted by: Guest on July-29-2021
1

json python

#load and print elements of a json file
import json
file = "my_json_file.json"

Json = json.load(open(file)) #Json is a dictionary

print(Json)
#OUTPUT:	'{ "name":"John", "age":30, "city":"New York"}'

print("Hello",Json["name"])
#OUTPUT:	Hello John
Posted by: Guest on July-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language