Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python json load file

import json

# with json load  (file)
info = open('data.json',)
res = json.load(info)
print(res)
print("Datatype after deserialization : " + str(type(res)))
#>>> {'name': 'Dave', 'City': 'NY'}
#>>> Datatype of the serialized JSON data : <class 'dict'>
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #python #json #load #file
ADD COMMENT
Topic
Name
5+3 =