View Source Jsonpatch.Operation.Test (Jsonpatch v2.0.0)
A test operation in a JSON patch prevents the patch application or allows it.
examples
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"}}}
Link to this section Summary
Link to this section Types
Link to this section Functions
@spec apply( Jsonpatch.t(), target :: Jsonpatch.Types.json_container(), Jsonpatch.Types.opts() ) :: {:ok, Jsonpatch.Types.json_container()} | Jsonpatch.Types.error()