Re: [Jsonpath] The draft: ambiguous language

Carsten Bormann <cabo@tzi.org> Thu, 10 December 2020 17:06 UTC

Return-Path: <cabo@tzi.org>
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 239733A1110 for <jsonpath@ietfa.amsl.com>; Thu, 10 Dec 2020 09:06:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level:
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1DAvKbb6EAD9 for <jsonpath@ietfa.amsl.com>; Thu, 10 Dec 2020 09:06:44 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8F94E3A0EC0 for <jsonpath@ietf.org>; Thu, 10 Dec 2020 09:06:44 -0800 (PST)
Received: from [192.168.217.120] (p548dca87.dip0.t-ipconnect.de [84.141.202.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4CsL1F6lFQzyy6; Thu, 10 Dec 2020 18:06:41 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CA+mwkt+PpWXsZ6R81X21qVtc2MXCgMXJ0-nfFocq9q7TfF_r0g@mail.gmail.com>
Date: Thu, 10 Dec 2020 18:06:41 +0100
Cc: Glyn Normington <glyn.normington.work@gmail.com>, jsonpath@ietf.org
X-Mao-Original-Outgoing-Id: 629312801.4920681-5d360dd53cac7386a45d2f26eba70e5b
Content-Transfer-Encoding: quoted-printable
Message-Id: <E98E85D5-A0D3-460E-9DC8-CCF401B14519@tzi.org>
References: <mailman.2754.1607359255.8352.jsonpath@ietf.org> <CA+mwktLNdF+Hw+Dwfe=r8pSL0T+BuebrRXZ3iqd2=ESZxSDi3w@mail.gmail.com> <C7AAE506-75C0-48C7-962B-28985A2D99F8@tzi.org> <CA+mwktJYokeQ87EjB-h+5y1WPrTWe42ArDHSWJFWDR1aY3rdzg@mail.gmail.com> <248696a566bd5974c8b78c5ee0a61ea12f224a84.camel@gmail.com> <CA+mwkt+PpWXsZ6R81X21qVtc2MXCgMXJ0-nfFocq9q7TfF_r0g@mail.gmail.com>
To: Daniel P <danielaparker@gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jsonpath/LfDbwlq6Qd6I97eCYHcAfkiJT8k>
Subject: Re: [Jsonpath] The draft: ambiguous language
X-BeenThere: jsonpath@ietf.org
X-Mailman-Version: 2.1.29
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, 10 Dec 2020 17:06:48 -0000

On 2020-12-10, at 17:58, Daniel P <danielaparker@gmail.com> wrote:
> 
>> Regardless of the current consensus, or lack of one, I find this
>> confusing since @ does not correspond to the current item (meaning an
>> individual member of the object). It's also unhelpful in deciding which
>> items to filter in/out.
>> 
> When an undefined term like "current item" occurs in a spec, some
> readers (such as this one) may draw a complete blank, while others
> may form an intuitive notion of what that means. But while
> "an individual member of the object" may seem intuitive,
> _none_ of the implementations in JSONPath Comparison support
> that notion, in fact that would require notation like @.key and @.value,
> which none support.

The processing model obviously needs to be written up.

I left off https://tools.ietf.org/html/draft-goessner-dispatch-jsonpath-00#section-3 from the merge proposal, maybe I should have left it in as a quarry.

This says:

   Within a script, @ stands for the position under consideration.

(Where “script” would now be “expression language”.)

Positions are on data items (called JSON values in RFC 8259), not on map entries (called members in RFC 8259, which are not JSON values).

   Position:  A JSON data item identical to or nested within the JSON
      data item to which the query is applied to, expressed either by
      the value of that data item or by providing a JSONPath Output
      Path.

(This could have said “argument” instead of "the JSON data item to which the query is applied to”.)

I didn’t want to spend a lot of time on the processing model until we understand what direction the discussion on the handling of duplicate matches is taking.

Grüße, Carsten