The JSONPath spec states that integers, e.g., those used as indices or in slice selectors, must be within a specific range [-2^53 +1, 2^53 - 1] (see here).
This PR adds a new Integer type to represent such integers and check that they stay within that range. It also caught a couple of places where overflows would have led to panics.
@Marcono1234 - thanks for the comments and for calling out the quirks in the API - I will submit another PR to update the API, and may request your review.
This PR is to address the recent CTS failure.
The JSONPath spec states that integers, e.g., those used as indices or in slice selectors, must be within a specific range [-2^53 +1, 2^53 - 1] (see here).
The CTS recently added tests to verify this behaviour in https://github.com/jsonpath-standard/jsonpath-compliance-test-suite/pull/90, and
serde_json_path
which was not accounting for it, was failing the updated CTS.This PR adds a new
Integer
type to represent such integers and check that they stay within that range. It also caught a couple of places where overflows would have led to panics.