minikube/vendor/github.com/evanphx/json-patch
Matt Rickard a02c9d9040 Vendor changes for v1.6.0-beta.4 2017-03-31 13:24:04 -07:00
..
.travis.yml added localkube and dependencies 2016-05-04 01:54:00 -07:00
LICENSE added localkube and dependencies 2016-05-04 01:54:00 -07:00
README.md Update kubernetes to v1.3.0-beta.1 2016-06-18 20:06:13 -07:00
merge.go Vendor changes for v1.6.0-beta.4 2017-03-31 13:24:04 -07:00
patch.go Vendor changes for v1.6.0-beta.4 2017-03-31 13:24:04 -07:00

README.md

JSON-Patch

Provides the ability to modify and test a JSON according to a RFC6902 JSON patch and RFC7396 JSON Merge Patch.

Version: 1.0

GoDoc

Build Status

API Usage

  • Given a []byte, obtain a Patch object

    obj, err := jsonpatch.DecodePatch(patch)

  • Apply the patch and get a new document back

    out, err := obj.Apply(doc)

  • Create a JSON Merge Patch document based on two json documents (a to b):

    mergeDoc, err := jsonpatch.CreateMergePatch(a, b)

  • Bonus API: compare documents for structural equality

    jsonpatch.Equal(doca, docb)