I thought I would be able to downcast an Any type to serde_json::Value.
let unpacked = content.try_unpack().unwrap();
let value= unpacked.downcast_ref::<serde_json::Value>().unwrap();
let title = value["title"].as_str().unwrap_or_else(|| "").to_string();
let description = value["description"].as_str().unwrap_or_else(|| "").to_string();
(title, description)
this is what i tried. Am I missing something or is this not possible.
I thought I would be able to downcast an Any type to serde_json::Value.
this is what i tried. Am I missing something or is this not possible.