Registry / serialization / evanphx-json-patch

evanphx-json-patch

JSON →
library5.9.11+incompatiblegogounverified

Package json-patch implements JSON Patch (RFC 6902) operations for applying patches to JSON documents.

go get github.com/evanphx/json-patch
INSTALL
IMPORT
SIG · EVANPHX-JSON-PATCH
E
evanphx-json-patch
serializationgov5.9.11+incompatible
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jsonpatch
github.com/evanphx/json-patch

Applies a JSON Patch to a document.

import "github.com/evanphx/json-patch" func main() { patch, err := jsonpatch.DecodePatch([]byte(`[{"op":"add","path":"/foo","value":"bar"}]`)) if err != nil { panic(err) } doc, err := patch.Apply([]byte(`{}`)) if err != nil { panic(err) } fmt.Println(string(doc)) }
Debug
Known issues
breakingVersion 5.9.11+incompatible indicates a major version mismatch; the module path does not include a /v5 suffix.
fix
Use a compatible version or update import path to include /v5 if needed.
affects: >=5.0.0
Upgrade
Version history
5.9.11+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
evanphx-json-patch — go get evanphx-json-patch · libregistry