apiserver/vendor/github.com/evanphx/json-patch
Kubernetes Publisher bd919879bd Merge pull request #61354 from schylek/master
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
2018-03-22 10:54:25 +00:00
..
.travis.yml Merge pull request #47353 from apelisse/http-cache 2017-08-29 13:14:36 +00:00
LICENSE sync: resync vendor folder 2017-02-23 11:13:21 -05:00
README.md sync: resync vendor folder 2017-02-23 11:13:21 -05:00
merge.go Merge pull request #47353 from apelisse/http-cache 2017-08-29 13:14:36 +00:00
patch.go Merge pull request #61354 from schylek/master 2018-03-22 10:54:25 +00: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)