jsonpatch

package
v0.0.1-alpha.36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyPatch

func ApplyPatch(original interface{}, patches []Patch) (interface{}, error)

ApplyPatch applies a series of JSON Patch operations to the original JSON object.

Types

type Patch

type Patch struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	From  string      `json:"from,omitempty"`
	Value interface{} `json:"value,omitempty"`
}

Patch represents a single JSON Patch operation.

func GeneratePatch

func GeneratePatch(before, after interface{}, basePath string) ([]Patch, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL