From a707058eb3996480afa52e6422ffa29ea8aeb298 Mon Sep 17 00:00:00 2001 From: Carsten Bormann Date: Thu, 24 Aug 2023 23:58:42 +0200 Subject: [PATCH] Rob Wilton #1: clarify luxury overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The specific case addressed here is about JSON values large enough so you no longer can evaluate [?length(@) < length($.a)]. This is a bit of a luxury problem, as 2**53 bytes ⩰ 9 Petabytes. Backblaze reports they can [store a Petabyte for some $35000][1], so this is not an entirely hypothetical case any more, and will get less so during the time the spec lasts. [1]: https://www.backblaze.com/blog/petabytes-on-a-budget-10-years-and-counting/ --- draft-ietf-jsonpath-base.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/draft-ietf-jsonpath-base.md b/draft-ietf-jsonpath-base.md index 3f28b417..254dc908 100644 --- a/draft-ietf-jsonpath-base.md +++ b/draft-ietf-jsonpath-base.md @@ -564,9 +564,10 @@ Obviously, an implementation can still fail when executing a JSONPath query, e.g., because of resource depletion, but this is not modeled in this document. However, the implementation MUST NOT silently malfunction. Specifically, if a valid JSONPath query is -evaluated against a structured value whose size does not fit in the -range of exact values, interfering with the correct interpretation of -the query, the implementation MUST provide an indication of overflow. +evaluated against a structured value whose size is too large to +process the query correctly (for instance requiring the processing of +numbers that fall outside the range of exact values), the implementation +MUST provide an indication of overflow. (Readers familiar with the HTTP error model may be reminded of 400 type errors when pondering well-formedness and validity, while