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

@type t() :: %Jsonpatch.Operation.Test{path: String.t(), value: any()}

Link to this section Functions