json
` module in Python. The `json.loads()
` function can be used to parse a JSON string and convert it into a Python object. Here is an example :import json
json_str = '{"name": "John", "age": 30, "city": "New York"}'
py_obj = json.loads(json_str)
print(py_obj)
{'name': 'John', 'age': 30, 'city': 'New York'}
json
` module. We then define a JSON string `json_str
`. We then use the `json.loads()
` function to convert the JSON string into a Python object and assign it to the variable `py_obj
`. print()
` function.