mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-05-19 00:00:14 +08:00
Merge branch 'master' into keymutex
Kubernetes-commit: e72b32558c8e9ed16690ef5a8e909c12fcc47f87
This commit is contained in:
+17
@@ -25,6 +25,23 @@ go get -u github.com/evanphx/json-patch
|
||||
* [Comparing JSON documents](#comparing-json-documents)
|
||||
* [Combine merge patches](#combine-merge-patches)
|
||||
|
||||
|
||||
# Configuration
|
||||
|
||||
* There is a global configuration variable `jsonpatch.SupportNegativeIndices`.
|
||||
This defaults to `true` and enables the non-standard practice of allowing
|
||||
negative indices to mean indices starting at the end of an array. This
|
||||
functionality can be disabled by setting `jsonpatch.SupportNegativeIndices =
|
||||
false`.
|
||||
|
||||
* There is a global configuration variable `jsonpatch.ArraySizeLimit`, which
|
||||
limits the length of any array the patched object can have. It defaults to 0,
|
||||
which means there is no limit.
|
||||
|
||||
* There is a global configuration variable `jsonpatch.ArraySizeAdditionLimit`,
|
||||
which limits the increase of array length caused by each operation. It
|
||||
defaults to 0, which means there is no limit.
|
||||
|
||||
## Create and apply a merge patch
|
||||
Given both an original JSON document and a modified JSON document, you can create
|
||||
a [Merge Patch](https://tools.ietf.org/html/rfc7396) document.
|
||||
|
||||
Reference in New Issue
Block a user