Answer:
Following are the program in the Python Programming Language.
import json #import package
#define function
def read_json(info):
return json.loads(info)#load data in variable
#call and print the function
print(read_json('[{'A': 10}, {'Y': 16}, {'U': 28}]'))
Output:
[{'A': 10}, {'Y': 16}, {'U': 28}]
Step-by-step explanation:
following are the description of the code
- Define function "read_json()" and pass an argument "info" inside it.
- Return the data inside from the "load()" function .
- Call the function i.e "read_json" and passing the value to that function.
- Print function print the data which is inside the "read_json" function.