View Source Jsonpatch.Operation.Copy (Jsonpatch v2.2.1)

Represents the handling of JSON patches with a copy operation.

Examples

iex> copy = %Jsonpatch.Operation.Copy{from: "/a/b", path: "/a/e"} iex> target = %{"a" => %{"b" => %{"c" => "Bob"}}, "d" => false} iex> Jsonpatch.Operation.Copy.apply(copy, target, []) {:ok, %{"a" => %{"b" => %{"c" => "Bob"}, "e" => %{"c" => "Bob"}}, "d" => false}}

Summary

Types

@type t() :: %Jsonpatch.Operation.Copy{from: String.t(), path: String.t()}

Functions