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

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

Functions