Re: [Json] Nudging the English-language vs. formalisms discussion forward

Mark Nottingham <mnot@mnot.net> Thu, 20 February 2014 01:32 UTC

Return-Path: <mnot@mnot.net>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BD1091A060C for <json@ietfa.amsl.com>; Wed, 19 Feb 2014 17:32:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 1I_6I3918_fp for <json@ietfa.amsl.com>; Wed, 19 Feb 2014 17:32:21 -0800 (PST)
Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183]) by ietfa.amsl.com (Postfix) with ESMTP id CF1561A0423 for <json@ietf.org>; Wed, 19 Feb 2014 17:32:21 -0800 (PST)
Received: from [192.168.1.55] (unknown [118.209.8.95]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 9E39C509B5; Wed, 19 Feb 2014 20:32:12 -0500 (EST)
Content-Type: text/plain; charset=windows-1252
Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CAHBU6is7iH3CQE4uH55iszCAQ1afDrX8MYVXkJY8cJJ96P+wBA@mail.gmail.com>
Date: Thu, 20 Feb 2014 12:32:11 +1100
Content-Transfer-Encoding: quoted-printable
Message-Id: <45357ADE-75B2-4D9D-AFEC-66B84E5D2320@mnot.net>
References: <CAHBU6itzQ0rzU3EUYUqzm2qhx03qk1mpx2sehS_zeiw1ypcEgw@mail.gmail.com> <CAK3OfOhfjkbq6eREkt=MBVL1C9ubh-6My3Lvg-mnOxD0+cpN1Q@mail.gmail.com> <CAHBU6isZbew8O1HJ+XcFsMCR42iDoO_uemPXVwa3=vM5A=MngA@mail.gmail.com> <CAK3OfOgmVsNJqrqCfsD7h37axssOoaX3DGHqO=bTn5bWrA+MFA@mail.gmail.com> <A4B53816-6FBF-4A37-8BC9-F0A9D0867BCD@tzi.org> <CAC4RtVDLQ3q5KxG+jDYfDB09JZUOBcojTR3ebxhr1QUOXLeEvA@mail.gmail.com> <CAMm+LwiCHt2NLW8AV93Tzh=hUXGT7SWM8W5zXSehmBF+nEMCkw@mail.gmail.com> <rvcag9tv4cn6jioncd1rmmc19gcm59l6e9@hive.bjoern.hoehrmann.de> <CAK3OfOgOghu_4jxHuoDSnHbyJJRu=xa_YBmgO92CMspMQApceg@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E1153B778363@WSMSG3153V.srv.dir.telstra.com> <CAHBU6is7iH3CQE4uH55iszCAQ1afDrX8MYVXkJY8cJJ96P+wBA@mail.gmail.com>
To: Tim Bray <tbray@textuality.com>
X-Mailer: Apple Mail (2.1827)
Archived-At: http://mailarchive.ietf.org/arch/msg/json/8xa6Z7gmJ9993V9mVNXVkOd_4d4
Cc: "Manger, James" <James.H.Manger@team.telstra.com>, JSON WG <json@ietf.org>
Subject: Re: [Json] Nudging the English-language vs. formalisms discussion forward
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Thu, 20 Feb 2014 01:32:24 -0000

+1 to the hm. ;)

I wouldn't object if someone wanted to establish a WebIDL profile, etc., or just refer to it in their spec.

I would have a problem if we started requiring people to use it.

Cheers,


On 20 Feb 2014, at 11:24 am, Tim Bray <tbray@textuality.com> wrote:

> Hm, obvious when you think about it, since JSON’s roots are in JavaScript and JSON docs are parseable as such, a bagful of JS assertions (yeah, I know JS doesn’t have an “assert” primitive, but still) could be a not-terrible stand-in for a schema. Sort of Schematron-like.
> 
> 
> On Wed, Feb 19, 2014 at 4:18 PM, Manger, James <James.H.Manger@team.telstra.com> wrote:
> One more example of an existing practice for describing JSON values appears in recent draft specs from the FIDO Alliance <http://fidoalliance.org/specifications/download>. It seems to be based on Web IDL with ECMAScript bindings <http://www.w3.org/TR/WebIDL/#ecmascript-binding>.  The following example comes from fido-uaf-protocol-v1.0-rd-20140209.pdf:
> 
> dictionary Version {
>   int mj; // Mandatory.
>   int mn; // Mandatory.
> }
> 
> dictionary OperationHeader {
>   Version upv; // Mandatory.
>   DOMString op; // Mandatory. Must be “Reg”, “Auth” or “Dereg”
>   DOMString appID; // Mandatory. string[1..512].
>   DOMString serverData; // Optional, string[1..1536]
>   Extension[] exts; // Optional.
> }
> 
> dictionary Extension {
>   DOMString id; // Mandatory. string[1..32].
>   DOMString data; // Mandatory. base64url(byte[1..8192]).
>   boolean fail_if_unknown;// Mandatory.
> }
> 
> 
> I don’t particularly like it; it doesn’t feel like JSON (eg "dictionary" vs "object"); constraints are all in comments; and IDL is aimed at APIs as opposed to protocol messages. But it sort-of works: it is fairly easy to guess what the JSON has to look like.
> 
> --
> James Manger
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
> 
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json

--
Mark Nottingham   http://www.mnot.net/