Function serde_hjson::value::to_value
[−]
[src]
pub fn to_value<T: ?Sized>(value: &T) -> Value where T: Serialize
Shortcut function to encode a T
into a Hjson Value
use serde_hjson::to_value; let val = to_value("foo"); assert_eq!(val.as_str(), Some("foo"))