pub fn overwrite(req: &Request) -> Result<String, TransformError>
Examples found in repository?
examples/usage.rs (line 35)
24fn overwrite() {
25 let sample_json = r#"{"hello": "world"}"#;
26
27 let req = transform::Request {
28 data: sample_json.into(),
29 path: "hello".to_string(),
30 value: r#""baz""#.to_string(),
31 truncate_options: None,
32 extract_options: None,
33 };
34
35 let updated_json = transform::overwrite(&req).unwrap();
36
37 println!(
38 "Input JSON: {} || Result JSON: {}",
39 sample_json, updated_json,
40 )
41}