pub fn obfuscate(req: &Request) -> Result<String, TransformError>
Examples found in repository?
examples/usage.rs (line 92)
81fn obfuscate_string() {
82 let sample_json = r#"{"hello": "world"}"#;
83
84 let req = transform::Request {
85 path: "hello".to_string(),
86 data: sample_json.into(),
87 value: "".to_string(), // default
88 truncate_options: None,
89 extract_options: None,
90 };
91
92 let updated_json = transform::obfuscate(&req).unwrap();
93
94 println!(
95 "Input JSON: {} || Result JSON: {}",
96 sample_json, updated_json,
97 )
98}