Re: [Jsonpath] Opsdir last call review of draft-ietf-jsonpath-base-16

Glyn Normington <glyn.normington.work@gmail.com> Thu, 03 August 2023 17:45 UTC

Return-Path: <glyn.normington.work@gmail.com>
X-Original-To: jsonpath@ietfa.amsl.com
Delivered-To: jsonpath@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 46C8CC15DF41; Thu, 3 Aug 2023 10:45:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mkmopr1tJPYs; Thu, 3 Aug 2023 10:45:21 -0700 (PDT)
Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8E959C1519BF; Thu, 3 Aug 2023 10:45:21 -0700 (PDT)
Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1bba04b9df3so10788605ad.0; Thu, 03 Aug 2023 10:45:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691084721; x=1691689521; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nHjzf7W5dKipxsnGEHwLBjhafrkDzHOxh5SxHQ5IzWU=; b=GFrLGZtsJqwGEGsCWQJioa6WkcMw4h43CZ96vf5napErIUgcYe9oHk2lJxxEwoDIev xu5H3EVpq1+VI31cMriYhOWThRbLtBoqeakZdtvF3mZLL2VjJvqA5vU32DlqWDl7cHnd ePV+Z26rfYwIUjrocNJ5Er41psjLl6ZW8b3VZP6UQT8RRZVmblLAFU2TI8U36gMBVmRF dNT73nE1jGDeaRCZcAZmmPDnVVfGw5j++uLZ6zCReh894bDHLJOvq5C7WqIvPvWFPHmY V0K4VEYfXP3K3paEhEmbvHn8UDiX2CR5bzFHpmzBAJdwBX7hEu+siwBAcedX10qOLm16 2CXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691084721; x=1691689521; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nHjzf7W5dKipxsnGEHwLBjhafrkDzHOxh5SxHQ5IzWU=; b=MhrVYkQORXGICcFL7i9OB/5uxiihKA33BDhfRnJvyn01RXY3ueomc5qY9Ozs6kcmTU Y8SGNipDzDOE6pr95shBhULWhrwn2JV1lb5N0CtegDCsqrOWJpHNBrqDwXyhXZYQiiEs PbBY3IGki2a4nVI/zkNTyYqb+3ZGMCI8yuAUo5c/74uxlT14OsB7svzUdAJGOGceoXXh 4+rS6Nf6nRe/DPcnfOc1irOzCzN2QeI1Vvs3DL4Lu1UyhwBmq+FwCdORPxpflDsdHHWG dGppSlc2l+ZR4N/Rhs0oEL5sWGbD2SJQ09T3pGyOCqNlukR/VJdCNvdcVErWmY3+XCaO 63fg==
X-Gm-Message-State: ABy/qLbxjRN5zzG7d9yjVXLTc2JIDq91xb+T+VTbSNPTrwEsSlOz6ao9 5ivUpE1DpgNgAWoZ331Dg6UQxr3eAOGam6oLlNBW/Wu1IG8=
X-Google-Smtp-Source: APBJJlGXS6YYCFfi72ZyO/Y6Bcx4SbSpR4PKK+5eWcAHLQJrU1YcDMJoLwN7P/kR/xTcR/CiY38eGBklsVn7sFizbSg=
X-Received: by 2002:a17:90a:b790:b0:267:f66a:f25f with SMTP id m16-20020a17090ab79000b00267f66af25fmr18316515pjr.11.1691084720833; Thu, 03 Aug 2023 10:45:20 -0700 (PDT)
MIME-Version: 1.0
References: <169099560074.55569.16694235228971863023@ietfa.amsl.com>
In-Reply-To: <169099560074.55569.16694235228971863023@ietfa.amsl.com>
From: Glyn Normington <glyn.normington.work@gmail.com>
Date: Thu, 03 Aug 2023 18:45:09 +0100
Message-ID: <CANH0Gb+ZGHQe71jshjrJpD-HfhuAgWFnb85QKvyzfk699SstTg@mail.gmail.com>
To: Joe Clarke <jclarke@cisco.com>
Cc: ops-dir@ietf.org, draft-ietf-jsonpath-base.all@ietf.org, jsonpath@ietf.org, last-call@ietf.org
Content-Type: multipart/alternative; boundary="000000000000120a91060208589e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jsonpath/wqlsMK11L-IRQvqNA6vz0HjNON8>
Subject: Re: [Jsonpath] Opsdir last call review of draft-ietf-jsonpath-base-16
X-BeenThere: jsonpath@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: A summary description of the list to be included in the table on this page <jsonpath.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jsonpath>, <mailto:jsonpath-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jsonpath/>
List-Post: <mailto:jsonpath@ietf.org>
List-Help: <mailto:jsonpath-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jsonpath>, <mailto:jsonpath-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Aug 2023 17:45:25 -0000

Hi Joe

Thanks for your feedback and I'm glad you enjoyed reading the spec. Perhaps
some editorial changes along the lines you suggest would be beneficial and
I'm not vetoing that if others agree, but let me try to justify the current
wording (inline below).

Regards,
Glyn
On Wed, 2 Aug 2023 at 18:00, Joe Clarke via Datatracker <noreply@ietf.org>
wrote:

> Reviewer: Joe Clarke
> Review result: Ready
>
> I have been tasked to review this draft on behalf of OPS DIR.  When I got
> the
> assignment I thought, "64 pages of JSONPath...this is going to hurt."  But
> I
> found this document very well-written and informative.  All in all, it was
> an
> easy and enjoyable read.  I like that examples were both frequent and
> addressed
> positive and negative cases.
>
> I also liked how the authors addressed the origin of JSONPath and the
> rationale
> for creating a standard and why the standard might deviate from other
> usages.
> That said, I expected to see a more thorough comparison of the original
> unofficial JSONPath specification and what is being standardized.  For
> example,
> I like https://cburgmer.github.io/json-path-comparison/ as a means to
> know how
> JSONPath is implemented in each language.  I'm not saying this draft needs
> such
> an extensive comparison of all languages, but perhaps specific instances
> where
> it deviates from its direct and explicit ancestor would be helpful.
>

I have a couple of hesitations. Firstly, I'm not sure it would be
particularly helpful to pick one of the many existing variants of JSONPath
for comparison (even if it was the original). Secondly, one of the reasons
for standardising JSONPath was the lack of formality, completeness,
etc. in Gössner's
rather brief article. So I feel the comparison would end up being rather
shallow unless we attempted to compare Gössner two implementations which
would be an open-ended exercise.

I'm sure migration guides will arise naturally as implementations of the
JSONPath standard become more common. These can be written from the
perspective of a particular language implementation and how to migrate from
an older implementation to an implementation of the standard. I feel these
would be much more useful than a brief "diff" in the spec.


> I had two comments otherwise:
>
> * In Section 1.5, two of your examples use parentheses whereas in Section
> 1.4.3
> the book example filter does not.  I didn't find clear guidance on when to
> use
> the paren-expression and when not to.


When writing a JSONPath query that needs to work with both standard and
non-standard implementations, parentheses would be necessary. However, I
think we might suffer from scope creep if the spec was to discuss how to
support non-standard implementations. Other than that, using or omitting
the parentheses is a matter of taste and not something I would say the spec
needs to provide guidance on. I guess we could strip out the parentheses in
1.5 for consistency.


> * In Section 2.3.5.2, sentence, "Applied
> to primitive values, it selects nothing." my gut was perhaps an additional,
> "and MUST NOT raise and error" should be added to be explicit that in this
> case
> an empty nodelist is expected and not an error.  Moreover, as I read
> further
> and "Nothing" is called out as a special type, I felt some explicit text
> that
> an empty nodelist is returned would add clarity.
>
>
The overview in 2.1.2 states "A syntactically valid segment MUST NOT
produce errors when executing the query." This principle applies throughout
and I'd like to avoid repeating this in specific sections.

The confusion between an empty nodelist and "Nothing" is a concern and may
need more wording to sort out, but again I'd prefer not to scatter this
throughout the spec.