module 'json' has no attribute 'eval'
时间: 2023-10-23 22:13:32 浏览: 104
求解报错:AttributeError:module ‘os’ has no attribute ‘exit’
This error message indicates that you are trying to use the `eval()` function from the `json` module, but that function does not exist in that module.
The `eval()` function is not part of the JSON standard, and it is generally not recommended to use it with JSON data because it can be a security risk.
Instead, you should use the `json.loads()` function to parse JSON data into a Python object, or the `json.dumps()` function to serialize a Python object into JSON format. These functions are part of the `json` module and are the recommended way to work with JSON data in Python.
阅读全文