Jsonpatch.Operation.Test (Jsonpatch v1.0.0) View Source

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.apply_op(test, target)
%{"x" => %{"y" => "Bob"}}

Link to this section Summary

Link to this section Types

Specs

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