View Source Jsonpatch.Operation.Replace (Jsonpatch v2.0.0)

The replace module helps replacing values in maps and structs by paths.

examples

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}}}

Link to this section Summary

Link to this section Types

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

Link to this section Functions