Native OCaml Rego/OPA policy engine
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-rego: json_patch_op_path delegates to value_to_path

+1 -10
+1 -10
lib/eval.ml
··· 1194 1194 let json_remove doc paths = 1195 1195 List.fold_left (fun acc path -> json_delete acc path) doc paths 1196 1196 1197 - let json_patch_op_path = function 1198 - | Value.String s -> parse_json_pointer s 1199 - | Value.Array xs -> 1200 - List.map 1201 - (function 1202 - | Value.String s -> s 1203 - | Value.Number n -> string_of_float_int n 1204 - | _ -> raise (Eval_error "json.patch: bad path segment")) 1205 - xs 1206 - | _ -> raise (Eval_error "json.patch: bad path") 1197 + let json_patch_op_path = value_to_path ~builtin:"json.patch" 1207 1198 1208 1199 (** Apply one RFC 6902 operation to a document. *) 1209 1200 let json_patch_apply doc op =