Function snitch_transform::transform::obfuscate
source · pub fn obfuscate(req: &TransformRequest) -> Result<String, TransformError>Examples found in repository?
examples/usage.rs (line 68)
61 62 63 64 65 66 67 68 69 70 71 72 73 74
fn obfuscate_string() {
let sample_json = r#"{"hello": "world"}"#;
let mut req = protos::transform::TransformRequest::new();
req.path = "hello".to_string();
req.data = sample_json.into();
let updated_json = snitch_transform::transform::obfuscate(&req).unwrap();
println!(
"Input JSON: {} || Result JSON: {}",
sample_json, updated_json,
)
}