Re: [Jsonpath] [ietf-wg-jsonpath/draft-ietf-jsonpath-jsonpath] A "General Considerations" section (#58)

"Martin J. Dürst" <duerst@it.aoyama.ac.jp> Wed, 10 March 2021 07:39 UTC

Return-Path: <duerst@it.aoyama.ac.jp>
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 8B6C33A1CBD for <jsonpath@ietfa.amsl.com>; Tue, 9 Mar 2021 23:39:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, NICE_REPLY_A=-0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=itaoyama.onmicrosoft.com
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 fqvSDQxy8IIH for <jsonpath@ietfa.amsl.com>; Tue, 9 Mar 2021 23:39:30 -0800 (PST)
Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400100.outbound.protection.outlook.com [40.107.140.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DFA593A1CBA for <jsonpath@ietf.org>; Tue, 9 Mar 2021 23:39:29 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lp8CnIHMhTSSALSTuCXl72hQ3qoArXhPgyfSb9qOgNB9LEk24dy4zsA38lfokMbgEwmKhSxSXeEE1qB4tTDR79LZ1SiEtR2xZSVRvbf4TQxXFckPr2ftY39vG6+lOWtWiLxgdtpFjGrPXHPNoORVJRfIoL9eZT42gZbNfR7XJbQ4xxZr0CVM2eMTbq36Juaht9ZxtUp+Z4SGb3S4RxpxtQs+dWjLbMyaK30ETb60TiEN+RcY/WcpWaucDrkpsaKV8c2BHBNkOhGn3p2/QzAbaFdETLwwDk4J4oLFALo+30lTNzXf7FSWlj99xic0sjgBW6swFGPp4ht01lJprzTpDg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QHeWAN2+EWPirhqnEk7FtwB1g6Lf2BlPXjIQgdxrBlA=; b=CM8ozOSFJpwxzid3EMDcqge9qzwkOkAmVN/wKoROtokTTA2bifk9qXeRYnBq8P6umgqSfkAg0pkxK4yvvnQjoHHyQhKXcT8roBPawRt2/LmohlS8f1PZzjltQmXGscA5lDxhOs3iumJrdYIHQTvhNzToSkhjv44qDML/bjZsKTn8PJPyS9YgTHuMxaepM6HAVxSrsUkvcMYr48hzLA+rPncEO08/sm9ZCoCpwXzVvsqt9aEbcuVXzAxumE6xH8PYCcYQFL9Vr6dUx7waMuRcVXl51oq+teDayVY/g/d66k5NCSx2fMCex+8pdwUWeZF9Wlwj8iau4DwmJg0kZI9y4w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=it.aoyama.ac.jp; dmarc=pass action=none header.from=it.aoyama.ac.jp; dkim=pass header.d=it.aoyama.ac.jp; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itaoyama.onmicrosoft.com; s=selector2-itaoyama-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QHeWAN2+EWPirhqnEk7FtwB1g6Lf2BlPXjIQgdxrBlA=; b=IQwyMEN6mtWks4Cf1rKCsSE8jx9lpRBpOwIcWYi4MyehFGrGk9J9usx4idf7KJShc2lMhBLTb51uZdQ6ff7vYaJEq7M11Vbc0kCfnyopiY/YFu/JM0ADfmtbAvUqrHinYvgghEFsHRsdZU0VB2w89iDvlvAimf4bleWnzyg7WOU=
Authentication-Results: ietf.org; dkim=none (message not signed) header.d=none;ietf.org; dmarc=none action=none header.from=it.aoyama.ac.jp;
Received: from TYAPR01MB5689.jpnprd01.prod.outlook.com (2603:1096:404:8053::7) by TYAPR01MB6251.jpnprd01.prod.outlook.com (2603:1096:402:3d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Wed, 10 Mar 2021 07:39:24 +0000
Received: from TYAPR01MB5689.jpnprd01.prod.outlook.com ([fe80::5996:7da1:39fe:eca2]) by TYAPR01MB5689.jpnprd01.prod.outlook.com ([fe80::5996:7da1:39fe:eca2%4]) with mapi id 15.20.3912.029; Wed, 10 Mar 2021 07:39:24 +0000
To: Greg Dennis <gregsdennis@yahoo.com>, cabo@tzi.org, jsonpath@ietf.org
References: <ietf-wg-jsonpath/draft-ietf-jsonpath-jsonpath/issues/58@github.com> <8A691340-D265-4A50-A003-4E836CB80F92@tzi.org> <1723015503.534113.1615276034552@mail.yahoo.com>
From: "Martin J. Dürst" <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
Message-ID: <6bdc5019-726c-f11a-fc24-f7ee58cd17ce@it.aoyama.ac.jp>
Date: Wed, 10 Mar 2021 16:39:21 +0900
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0
In-Reply-To: <1723015503.534113.1615276034552@mail.yahoo.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Originating-IP: [223.217.46.174]
X-ClientProxiedBy: TY1PR01CA0146.jpnprd01.prod.outlook.com (2603:1096:402:1::22) To TYAPR01MB5689.jpnprd01.prod.outlook.com (2603:1096:404:8053::7)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from [192.168.1.7] (223.217.46.174) by TY1PR01CA0146.jpnprd01.prod.outlook.com (2603:1096:402:1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Wed, 10 Mar 2021 07:39:23 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: f4077d58-4fad-4afc-5ce2-08d8e397a002
X-MS-TrafficTypeDiagnostic: TYAPR01MB6251:
X-Microsoft-Antispam-PRVS: <TYAPR01MB625126B5D9E7DC9C2BBD4571CA919@TYAPR01MB6251.jpnprd01.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: QBPL9UaYu7kc3IiFjZz6yBZEaBcM2AO6qjc8Vm9Q8XhBXmhgLPno9DIHq0b4FjOIzLcsju0m6f8c2BYOGtpge4ZKZ90fDGQadDwDJSLiRWmvuHtk4/euigKrvtTST2FjNpUM3GkMg2ipQq1FJPRQC8FGOX4ioT6rFR33TZDwbTxEl+UI1IBN2dFCNnhr6XXHeGUGerFr8/4Xvyj+uBPgONkY2a44clRmE24dAUvUAlFNeE7wc3przzhv2Q7nAaH5Pb20Vk4gVXDIjHJUsapkUs6fbfRcxMYrDsneamCLVmvPiKfha+tlqG4d6+QzszWNXvVVuoiLi/qLq4bloczBLdmnyQRgUWGfnFgGD7aVjkX68+jLCOg1e200uPHIfP9TFkGJ5oMsNhdRzNGZFUUOelNIsahIfuyRw16XSu0KffVhuG7/TEKQJ7V1QEKxR9q9mdCD2zFvg68mZvS7ZCN0SkDHmMZledPuZhGimyuC4LS8QtqIJTasSLVkY0PiFTQq7z5g9tAaScimh4g7z1OBNSYTG9L+7m2+zFgsgnFVBKDtch23uu8cW8UJO7PaIyJcogpr/zfQGRBsjX0vmxZuUCsNE+QEdSODKwAZkZn5fbQ=
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYAPR01MB5689.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(136003)(376002)(396003)(39840400004)(366004)(2616005)(956004)(31686004)(83380400001)(5660300002)(52116002)(8936002)(8676002)(66476007)(36916002)(66946007)(66556008)(86362001)(786003)(316002)(478600001)(31696002)(16576012)(6486002)(186003)(16526019)(2906002)(26005)(53546011)(45980500001)(43740500002); DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData: eC7aKvrMqhzhzOVc2kzwP+RV2Zxf93k42RdInSiP5W3bVxzLqRRPMIQEoqRTjK0mVT45pvOGXKYQAhiYIbhfidrU+cqDl1rTVPybG4hV0Rfu3ckJ/AWCTB06clnGLHD1D2l3MwZUQwRtyT2Yb+sQvBrxESKc6HVDfbf9dQc5gmQUVE953v78Lj98P93beUajQfu5s6gO8ntFLXUbrmjlSbOGZazKcaR28P+ikRtieKBH2ESDMpdGqKW68OXuz3zcZhKK2duQFrZM8/J8U4hwRoXw/JA1T8T/6eOza4K9iYiJaqZOP2Vg4Z0IW7uA1seLAWNPKdEWofH7tI/nPoqZlRG5xiBae8NAlXmN2ceCQOcfkAkBoFKrBkR5RkeBq50G+x5tILq5VNPeieVBC8BWkSZ7qsvYT1M6vSQi/EV11f5jg4jXSWBPQgS6C1UxU0c8XWWK/hroHecBn2AYaptsJZ2N4JtgTW+QcMi1GtSHHiv51jPgxhjvhSGNgKPw7HJBbJ3/Fn63rb7w5Sq3WwCFqVrWHRMCkTLFAGGGvl88A2OXbPK9IBjAf4Qk8nTAnfl73LzviuX6xFJQJNrtSGDdNIXptVjBEXkHyj4Dx3F7YMi76JqSOAWMYQoj75ADTnbv5ykslcI8WFFHMJbMqc96NtoXHlntH8wav7zHhvP37P+wz7KZ0Xqby34ZjnW4FMqi1W9l6gFSk8ZnI5oUOkxWxuU+6UoZHL27WKC5yQCkBXw1MvT8A8jtJ+HOpCdWefIilybDKiSK3DMR3AIZlPPq4XUg88nhdvW7P4gMP3p48QL4e8rVhJN6kYpWl+C/6g/l8hoV2z3g+ct5qBsoP671vYUNq964ATWHK6uZnqJ2K+SRocGfErvwhRlemNE/JGO0X3S06Lbf807iqJcKQssOtpPBATtf9iaxGYDA3Ktj1Uy6IjFEI6IGvLGc7x4yArgWRpl7tWMx3p64qBu7Pm+TW5m4LNCPRBoE8d76ycRD3xsGeO3nKl+zlm+5giibwpxE0XkRLyCX9tmQQGV+U/GBfUmHY+6qfCzbjlC9NW4Ie0Ehc7XOcJtqMQtY2sQrrgN2dBVe20Xi3q+wSHYSxPBB5t+c8r0CRKZUYfM3Y7g7aVsXoGaDOjpkqaG1YtplRSXiFS4t/dJ2IiLwwg4f6Vqnb7U2KRDNe9S3nnHayK5+FLLPp4KvHDZUkpxG3PjeNqS2E9Fos2YxL2CY8DNlNYwoXSnSwGlNbzdMUQcZaQbs4PjAoqCsT+zF6UtpUTao3FYwxaXhP7594iRdVlYnBT3yCHHSEZK+/3JI6HHGXSKU3GO1ZwLC6Dzg1xIj1agovgTW
X-OriginatorOrg: it.aoyama.ac.jp
X-MS-Exchange-CrossTenant-Network-Message-Id: f4077d58-4fad-4afc-5ce2-08d8e397a002
X-MS-Exchange-CrossTenant-AuthSource: TYAPR01MB5689.jpnprd01.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 07:39:23.9590 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: e02030e7-4d45-463e-a968-0290e738c18e
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 8cKjqF8DHn2xopgBRT4CWGHJYetWTT/Dxk6dYPbOAvKFHutL+7+CLCU4kwrBT+jkROVr5DsbOMF3Pe+EQC659g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB6251
Archived-At: <https://mailarchive.ietf.org/arch/msg/jsonpath/0w_2mRGBcxgO2tm40bAksusDelg>
Subject: Re: [Jsonpath] [ietf-wg-jsonpath/draft-ietf-jsonpath-jsonpath] A "General Considerations" section (#58)
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: Wed, 10 Mar 2021 07:39:33 -0000

On 09/03/2021 16:47, Greg Dennis wrote:
> This formatting (or lack thereof) removes all cues as to what's the Schema spec text vs my comments vs your comments.
> Greg

Hello Greg,

In the messages from Carsten, I can easily see the distinction. In 
messages from you, either things are reversed (your new comments look 
like cited text whereas all the cited text looks like it's newly written 
text) or there's no distinction at all.

You probably have more of a clue as to why that happens than me. I have 
seen other IETF participants with various similar issues, but not 
something exactly like you. What Carsten's mailer does is what I see 
most other mailers in IETF discussions do.

I hope you can fix the issues on your side soon.

Regards,   Martin.

P.S.: I'm using Thunderbird.


>   
>    On Tue, 9 Mar 2021 at 8:40 pm, Carsten Bormann<cabo@tzi.org> wrote:   Moving this discussion to the list, because it touches a large number of issues.
> I’ll try to parse apart this pile of unrelated considerations; maybe we can dispatch them into the specific issues raised.
> 
> 
> 6.1. Range of JSON Values
> 
> An instance may be any valid JSON value as defined by JSON. JSON Schema imposes no restrictions on type: JSON Schema can describe any JSON value, including, for example, null.
> 
> 
> JSON Schema uses the word "instance" to describe the JSON data that's being validated. We seem to have landed on the word "data." Regardless, I think the gist of this also holds true for JSON Path: input values can be of any JSON type (although only certain types may return results depending on the Path)
> 
> Yes, JSONpath should be able to be applied to any JSON data item (JSON value).If we haven’t said so yet, that’s probably because it is an obvious property of a useful query language…(Editorial, if you ask me.)
> 
> 
> 
> 6.2. Programming Language Independence
> 
> JSON Schema is programming language agnostic, and supports the full range of values described in the data model. Be aware, however, that some languages and JSON parsers may not be able to represent in memory the full range of values describable by JSON.
> 
> 
> This, I think, is of utmost importance. We definitely should not favor a specific language. Doing so would inhibit inclusivity and shun people who work in incompatible frameworks.
> 
> There is a wide gamut of meanings to the expression “favor a specific language”.Is requiring arbitrary precision integers “favoring a specific language”?  Specifying a specific regex dialect?We may need to accept the dominance of certain platforms in our decisions (e.g., the I-JSON limitations caused by JavaScript), so I don’t know how to act on this.
> Of course, we shouldn’t wholesale import a language (e.g., as the expression language), except if we do.
> 
> 
> This statement also makes it clear that it's understood that some frameworks inherently have limitations that may prevent them from being able to implement the full expression of JSON Schema. Declaring this outright allows such frameworks to have partial "best effort" implementations and still be compliant with the specification.
> 
> We probably want to avoid compliance levels, profile implementation conformance statements…Just as we need “extension points” (see below), we may need “limitation points”.
> 
> 
> 
> 6.3. Mathematical Integers
> 
> Some programming languages and parsers use different internal representations for floating point numbers than they do for integers.
> 
> For consistency, integer JSON numbers SHOULD NOT be encoded with a fractional part.
> 
> 
> I'm not sure whether this would apply for us, except maybe for array indices.
> 
> No idea what this does here.  We don’t get to decide how our JSON input is encoded.More importantly, we don’t get to see that (unless we require JSONpath to be used only with a specialty not-quite-JSON decoder!).
> (But, indeed, we do get to decide the number system used in our expression language.)
> 
> 
> 
> 6.4. Regular Expressions
> 
> Keywords MAY use regular expressions to express constraints, or constrain the instance value to be a regular expression. These regular expressions SHOULD be valid according to the regular expression dialect described in ECMA-262, section 21.2.1.
> 
> Regular expressions SHOULD be built with the "u" flag (or equivalent) to provide Unicode support, or processed in such a way which provides Unicode support as defined by ECMA-262.
> 
> Furthermore, given the high disparity in regular expression constructs support, schema authors SHOULD limit themselves to the following regular expression tokens:
>     
>     - individual Unicode characters, as defined by the JSON specification;
>     - simple character classes ([abc]), range character classes ([a-z]);
>     - complemented character classes ([^abc], [^a-z]);
>     - simple quantifiers: "+" (one or more), "" (zero or more), "?" (zero or one), and their lazy versions ("+?", "?", "??");
>     - range quantifiers: "{x}" (exactly x occurrences), "{x,y}" (at least x, at most y, occurrences), {x,} (x occurrences or more), and their lazy versions;
>     - the beginning-of-input ("^") and end-of-input ("$") anchors;
>     - simple grouping ("(...)") and alternation ("|").
>     - Finally, implementations MUST NOT take regular expressions to be anchored, neither at the beginning nor at the end. This means, for instance, the pattern "es" matches "expression".
> 
> 
> Not sure if we're planning on supporting regular expressions. It appears that some implementations do have some support, but it's all extension on the original syntax at this point. Still, this is a good declaration of support.
> 
> As we define our own expression language, we also get to define our own regular expression dialect (I hope in a less mushy way than above).
> 
> 
> It also ties in closely to section 6.2 regarding framework limitations as not all frameworks support the same flavor of regular expression syntax.
> 
> It may be worthwhile to quell outright the expectation that the JSONpath regexes can just be dumped into the implementation regex dialect.
> 
> 
> 
> 6.5. Extending JSON Schema
> 
> Additional schema keywords and schema vocabularies MAY be defined by any entity. Save for explicit agreement, schema authors SHALL NOT expect these additional keywords and vocabularies to be supported by implementations that do not explicitly document such support. Implementations SHOULD treat keywords they do not support as annotations, where the value of the keyword is the value of the annotation.
> 
> Implementations MAY provide the ability to register or load handlers for vocabularies that they do not support directly. The exact mechanism for registering and implementing such handlers is implementation-dependent.
> 
> 
> This is good to have because invariably, implementations will want to extend functionality beyond what's in the spec. It basically covers other implementations from also having to provide the same extensions, requiring only what is stated in the spec.
> 
> It also mentions "vocabularies," which are a spec-defined mechanism by which implementation can extend functionality via new keywords in such a way that they can optionally be supported in other implementations. Furthermore, this mechanism allows the other implementations to refuse to process a schema that requires a given vocabulary if the implementation doesn't understand it. This bit I think is good for later when we eventually get to spec-defined extension mechanisms, but I don't expect that'll be in the first draft.
> 
> 
> Yes, we need an extensibility (and evolvability) story.This will revolve around extension points, which need to be defined in a more rigorous way than “ignore what you don’t understand”.We may also decide not to have extension points (like JSON did), but we need to make this decision in a very conscious way.
> Grüße, Carsten
> 
>