pub fn to_json_value<T: Serialize + ?Sized>(value: &T) -> Result<JsValue, Error>