rulemorph 0.3.3

YAML-based declarative data transformation engine for CSV/JSON to JSON
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[test]
fn test_is_v2_expr_pipe_array() {
        // Helper function to detect v2 syntax
        assert!(is_v2_expr(&json!(["@input.name", "trim"])));
        assert!(is_v2_expr(&json!([])));
        assert!(is_v2_expr(&json!(["hello", "trim"])));
        assert!(is_v2_expr(&json!([{"lookup_first": []}, "trim"])));
        assert!(is_v2_expr(&json!("@input.name")));
        assert!(is_v2_expr(&json!("lit:@input.name")));
        assert!(!is_v2_expr(&json!({ "ref": "input.name" })));
        assert!(!is_v2_expr(&json!({ "op": "uppercase", "args": [] })));
}