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/cameront/go-jsonpatch
Apply a JSON Patch to a document
package main
import (
"fmt"
"github.com/cameront/go-jsonpatch"
)
func main() {
patch := []byte(`[{"op":"replace","path":"/name","value":"Bob"}]`)
doc := []byte(`{"name":"Alice"}`)
result, err := jsonpatch.ApplyPatch(doc, patch)
if err != nil {
panic(err)
}
fmt.Printf("Result: %s\n", result)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20180223123257-a8710867776elatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.