Function edge::value::to_value []

pub fn to_value<T>(value: &T) -> Value where T: Serialize + ?Sized

Shortcut function to encode a T into a JSON Value

use serde_json::to_value;
let val = to_value("foo");
assert_eq!(val.as_string(), Some("foo"))