Library used by snitch-wasm to perform transformations on JSON payloads.
Currently only has support for overwrite
, mask
and obfuscate
.
```rust use snitchprotos as protos; use snitchtransform::transform;
func main() { let sample_json = r#"{"hello": "world"}"#;
let mut req = protos::transform::TransformRequest::new(); req.data = samplejson.into(); req.path = "hello".tostring(); req.value = r#""baz""#.to_string();
let updatedjson = snitchtransform::transform::overwrite(&req).unwrap();
println!("Input JSON: {} || Result JSON: {}", samplejson, updatedjson) } ```
overwrite()
"123"
)mask()
0
*
obfuscate()