Re: [Json] JSON Content Rules

Carsten Bormann <cabo@tzi.org> Wed, 24 January 2018 13:11 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1ACEE12D94E for <json@ietfa.amsl.com>; Wed, 24 Jan 2018 05:11:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 JIAHMi2BuSad for <json@ietfa.amsl.com>; Wed, 24 Jan 2018 05:11:18 -0800 (PST)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (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 C514012421A for <json@ietf.org>; Wed, 24 Jan 2018 05:11:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::b]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id w0ODBCj1026864; Wed, 24 Jan 2018 14:11:12 +0100 (CET)
Received: from [192.168.217.114] (p5DC7EAF5.dip0.t-ipconnect.de [93.199.234.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 3zRQXc2VxrzDWtT; Wed, 24 Jan 2018 14:11:12 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <a36fc644-d3be-201e-b044-ed371fe7e52b@codalogic.com>
Date: Wed, 24 Jan 2018 14:11:11 +0100
Cc: Daniel P <danielaparker@gmail.com>, JSON WG <json@ietf.org>
X-Mao-Original-Outgoing-Id: 538492270.27095-4d9739417255fe75bce36e3c02e09584
Content-Transfer-Encoding: quoted-printable
Message-Id: <3600B43A-97D5-406C-AE85-8BF90F577B75@tzi.org>
References: <CA+mwktJU4xVHxRzgd=dcCKvUv3Om3qeBEhqTaW2sniLQ95+QDA@mail.gmail.com> <a36fc644-d3be-201e-b044-ed371fe7e52b@codalogic.com>
To: Pete Cordell <petejson@codalogic.com>
X-Mailer: Apple Mail (2.3445.5.20)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/6c2NXkd4H1D4J3qnu61BE1ewvWo>
Subject: Re: [Json] JSON Content Rules
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Jan 2018 13:11:20 -0000

On Jan 24, 2018, at 13:19, Pete Cordell <petejson@codalogic.com> wrote:
> 
>   "foo" - A member name (but see caveat below)
>   'bar' - A string value (new syntax, but also see below)
>   /^baz\d+$/ - A regex value
>   `biff\d+` - A member name regex (new syntax)

Hmm.

> We wanted to still allow JCR to be a superset of JSON syntax (to facilitate easy creation of JCR from example JSON).  So we wanted to allow:
> 
>    { "name" : "Fred" }

Right.  In JSON, a string is a string…

What is the syntactical feature of JCR that makes this distinction necessary?
Maybe you can fix that feature instead?

(When we designed CDDL, we didn’t have to make a distinction between string values destined as member names and string values destined as member values — indeed strings are strings. Now the CDDL syntax is very simple and does not leave any ambiguity as to whether we are talking about a member name or a member value; I haven’t looked at JCR recently enough to answer my own question here.)

Grüße, Carsten