View Source Jsonpatch.Operation.Replace (Jsonpatch v2.2.1)
The replace module helps replacing values in maps and structs by paths.
Examples
iex> add = %Jsonpatch.Operation.Replace{path: "/a/b", value: 1}
iex> target = %{"a" => %{"b" => 2}}
iex> Jsonpatch.Operation.Replace.apply(add, target, [])
{:ok, %{"a" => %{"b" => 1}}}
Summary
Types
Functions
@spec apply( Jsonpatch.t(), target :: Jsonpatch.Types.json_container(), Jsonpatch.Types.opts() ) :: {:ok, Jsonpatch.Types.json_container()} | Jsonpatch.Types.error()