python · 1月 17, 2023 0

How to read and parse JSON using json.load()

内容纲要

Python supports JSON through a built-in package called JSON.To use this feature, we import the JSON package in the script.The text in JSON is through quoted-string. It contains the value in key-value mapping within {.It is similar to the dictionary .

json.load()

Json.load() takes a file object .A JSON object contains data.The keys are strings and the values are the JSON types.
Syntax :

json.load(file_object)

Argument : It takes file object as a parameter.
Return : It return the JSON object.

%d 博主赞过: