View Source Jsonpatch.Operation.Test (Jsonpatch v2.2.1)
A test operation in a JSON patch prevents the patch application or allows it.
Examples
iex> test = %Jsonpatch.Operation.Test{path: "/x/y", value: "Bob"} iex> target = %{"x" => %{"y" => "Bob"}} iex> Jsonpatch.Operation.Test.apply(test, target, []) {:ok, %{"x" => %{"y" => "Bob"}}}
Summary
Types
Functions
@spec apply( Jsonpatch.t(), target :: Jsonpatch.Types.json_container(), Jsonpatch.Types.opts() ) :: {:ok, Jsonpatch.Types.json_container()} | Jsonpatch.Types.error()