Function streamdal_wasm_transform::transform::obfuscate
source · pub fn obfuscate(req: &Request) -> Result<String, TransformError>
Examples found in repository?
examples/usage.rs (line 77)
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
fn obfuscate_string() {
let sample_json = r#"{"hello": "world"}"#;
let req = transform::Request {
path: "hello".to_string(),
data: sample_json.into(),
value: "".to_string(), // default
};
let updated_json = transform::obfuscate(&req).unwrap();
println!(
"Input JSON: {} || Result JSON: {}",
sample_json, updated_json,
)
}