Documentation
¶
Index ¶
Constants ¶
View Source
const ( OperationAdd = "add" OperationReplace = "replace" OperationRemove = "remove" OperationMove = "move" OperationCopy = "copy" OperationTest = "test" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct {
Type string `json:"op" yaml:"op"`
Path Path `json:"path" yaml:"path"`
From Path `json:"from,omitempty" yaml:"from,omitempty"`
Value interface{} `json:"value,omitempty" yaml:"value,omitempty"`
// If not empty, will be inserted as a head comment above this node
Comment string `json:"comment,omitempty" yaml:"comment,omitempty"`
}
Operation represents a RFC6902 JSON Patch operation.
type Path ¶
type Path []string
Path represents a decoded JSON patch targeting a location within a document. Use ParsePath or UnmarshalText to construct a Path.
func MustParsePath ¶
MustParsePath is like ParsePath but panics in case of invalid input.
func (Path) MarshalText ¶
func (*Path) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.