jsonpatch

package
v1.2.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package jsonpatch implements RFC 6902 JSON Patch: a sequence of add, remove, replace operations that transforms one JSON document into another. Used as an alternative delta format for MCP resource notifications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(doc, patch []byte) ([]byte, error)

func Diff

func Diff(prev, curr []byte) ([]byte, error)

Types

type Operation

type Operation struct {
	Op    string `json:"op"`
	Path  string `json:"path"`
	Value any    `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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