Jsonpatch.Operation.Replace (Jsonpatch v0.12.0) View Source

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.apply_op(add, target)
%{"a" => %{"b" => 1}}

Link to this section Summary

Link to this section Types

Specs

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