Function value_to_pydict
Source pub fn value_to_pydict(py: Python<'_>, val: &Value) -> PyResult<Py<PyAny>>
Expand description
Converts a JSON Value::Object into a Python dict.
§Panics
Panics if creating a Python list fails due to an invalid iterator.
§Errors
Returns a PyErr if:
- the input
val is not a JSON object.
- conversion of any nested JSON value into a Python object fails.