Fixes
-
Fixed JSON pointers with negative indices.
Previously, negative indices were resolved against array-like values, but the JSON Pointer specification (RFC 6901) does not permit negative array indexes. We now raise a
JSONPointerIndexError
when a JSON Pointer attempts to resolve an array element using a negative index.For users who require negative indices in JSON Pointers, you can set
JSONPointer.min_int_index
to a suitably negative integer, likeJSONPointer.min_int_index = -(2**53) + 1
.See #116.
-
Fixed the JSON Patch
add
operation.Previously, a
JSONPatchError
was raised when pointing to an array index equal to the array's length. Now we append to arrays in such cases. See #117.