Skip to content

Commit

Permalink
Add note about SupportNegativeIndices
Browse files Browse the repository at this point in the history
  • Loading branch information
evanphx committed Sep 12, 2018
1 parent fcd53ec commit 72bf35d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ go get -u github.com/evanphx/json-patch
* [Comparing JSON documents](#comparing-json-documents)
* [Combine merge patches](#combine-merge-patches)


# Configuration

There is a single 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`.

## 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.
Expand Down

0 comments on commit 72bf35d

Please sign in to comment.