package jsonpatch
import "gomodules.xyz/jsonpatch/v2"
Index ¶
Types ¶
type ByPath ¶
type ByPath []Operation
func (ByPath) Len ¶
func (ByPath) Less ¶
func (ByPath) Swap ¶
type JsonPatchOperation ¶
type JsonPatchOperation = Operation
type Operation ¶
type Operation struct { Operation string `json:"op"` Path string `json:"path"` Value interface{} `json:"value,omitempty"` }
func CreatePatch ¶
CreatePatch creates a patch as specified in http://jsonpatch.com/
'a' is original, 'b' is the modified document. Both are to be given as json encoded content. The function will return an array of JsonPatchOperations
An error will be returned if any of the two documents are invalid.
func NewOperation ¶
func (*Operation) Json ¶
func (*Operation) MarshalJSON ¶
Source Files ¶
jsonpatch.go
- Version
- v2.5.0 (latest)
- Published
- Mar 9, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- now –
Tools for package owners.