pub fn value_to_pyobject(py: Python<'_>, val: &Value) -> PyResult<Py<PyAny>>Expand description
Helper function to convert a serde_json::Value to a Python object.
This is a common conversion pattern used when converting Params to Python dicts.
§Errors
Returns a PyErr if the value type is unsupported or conversion fails.
§Panics
Panics if a numeric value claims to be i64/u64/f64 via the predicate
methods but the corresponding accessor returns None (should not happen for
well-formed serde_json::Number values).