View Source Jsonpatch.Operation.Move (Jsonpatch v2.2.1)
Move operations change the position of values in map or struct.
Examples
iex> move = %Jsonpatch.Operation.Move{from: "/a/b", path: "/a/e"}
iex> target = %{"a" => %{"b" => %{"c" => "Bob"}}, "d" => false}
iex> Jsonpatch.Operation.Move.apply(move, target, [])
{:ok, %{"a" => %{"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()