Re: [Jsonpath] Returning multiple values: (was Controversial issues)

Carsten Bormann <cabo@tzi.org> Thu, 05 November 2020 23:24 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 D22223A0408 for <jsonpath@ietfa.amsl.com>; Thu, 5 Nov 2020 15:24:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 wvmS3inJmdJ6 for <jsonpath@ietfa.amsl.com>; Thu, 5 Nov 2020 15:24:03 -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 A91843A03F8 for <jsonpath@ietf.org>; Thu, 5 Nov 2020 15:24:03 -0800 (PST)
Received: from [192.168.217.118] (p548dcc60.dip0.t-ipconnect.de [84.141.204.96]) (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 4CS02n5MrpzySK; Fri, 6 Nov 2020 00:24:01 +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: <CAHBU6isTwQceLNO7i_MyfM4UXtSQd_Pg_VzqA_Hvvnj0SD+soQ@mail.gmail.com>
Date: Fri, 06 Nov 2020 00:24:01 +0100
Cc: Daniel P <danielaparker@gmail.com>, jsonpath@ietf.org
X-Mao-Original-Outgoing-Id: 626311441.411808-4053850d50ca160b57e22a9fe775078e
Content-Transfer-Encoding: quoted-printable
Message-Id: <100E9E20-72B8-48D8-AAFB-3BC2B85C4456@tzi.org>
References: <mailman.78.1604606409.10863.jsonpath@ietf.org> <CA+mwktJ3CWEKQ5yoty_9=_kMPMjrNtC+9anPPDHHqbqjOn224A@mail.gmail.com> <CA+mwkt+Q=kRCnK3qB4nJau44CWrhhVUY77Cw1vzeqkPsMVDh=A@mail.gmail.com> <CAHBU6isTwQceLNO7i_MyfM4UXtSQd_Pg_VzqA_Hvvnj0SD+soQ@mail.gmail.com>
To: Tim Bray <tbray@textuality.com>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jsonpath/lnCyAhBaVoZUT_aODDDoYfIEhb8>
Subject: Re: [Jsonpath] Returning multiple values: (was Controversial issues)
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, 05 Nov 2020 23:24:06 -0000

On 2020-11-06, at 00:19, Tim Bray <tbray@textuality.com> wrote:
> 
> In the heavily JSONPath-dependent app I most recently worked on, when applying a JSONPath returned multiple values, we exposed that as a JSON array.  Not religious about this issue, but the return-an-array seemed to surprise nobody and make people happy.

I wasn’t even aware that there is a question here.

https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html#name-return-value

(Clearly, I would get rid of the “false” special case — an empty array is fine.)

Grüße, Carsten


> 
> On Thu, Nov 5, 2020 at 3:10 PM Daniel P <danielaparker@gmail.com> wrote:
> On 5 Nov 2020, at 11:14, Carsten Bormann <cabo@tzi.org> wrote:
> 
> > The underlying problem here is that of a missing model.
> > XPath has nodesets, and we probably need something like that.
> 
> Unlike XPath, where an expression can return items that are
> not XML documents, a JSONPath expression can only return
> JSON values, and a collection of JSON values can be
> returned in a JSON array value. Consequently, introducing
> the idea of node-sets into JSONPath would seem to
> serve no purpose.
> 
> Daniel
> 
> -- 
> Jsonpath mailing list
> Jsonpath@ietf.org
> https://www.ietf.org/mailman/listinfo/jsonpath
> -- 
> Jsonpath mailing list
> Jsonpath@ietf.org
> https://www.ietf.org/mailman/listinfo/jsonpath