View Source Jsonpatch.Operation.Copy (Jsonpatch v2.2.1)
Represents the handling of JSON patches with a copy operation.
Examples
iex> copy = %Jsonpatch.Operation.Copy{from: "/a/b", path: "/a/e"} iex> target = %{"a" => %{"b" => %{"c" => "Bob"}}, "d" => false} iex> Jsonpatch.Operation.Copy.apply(copy, target, []) {:ok, %{"a" => %{"b" => %{"c" => "Bob"}, "e" => %{"c" => "Bob"}}, "d" => false}}
Summary
Types
Functions
@spec apply( Jsonpatch.t(), target :: Jsonpatch.Types.json_container(), Jsonpatch.Types.opts() ) :: {:ok, Jsonpatch.Types.json_container()} | Jsonpatch.Types.error()