View Source Jsonpatch.Operation.Test (Jsonpatch v2.2.0)

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

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

Functions