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

"Manger, James" <James.H.Manger@team.telstra.com> Thu, 20 February 2014 00:18 UTC

Return-Path: <James.H.Manger@team.telstra.com>
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 1D6AF1A05D2 for <json@ietfa.amsl.com>; Wed, 19 Feb 2014 16:18:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.202
X-Spam-Level:
X-Spam-Status: No, score=-0.202 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, RCVD_IN_DNSWL_NONE=-0.0001, RELAY_IS_203=0.994] autolearn=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 u6I8u63XN_Y9 for <json@ietfa.amsl.com>; Wed, 19 Feb 2014 16:18:49 -0800 (PST)
Received: from ipxavo.tcif.telstra.com.au (ipxavo.tcif.telstra.com.au [203.35.135.200]) by ietfa.amsl.com (Postfix) with ESMTP id C2D8B1A054D for <json@ietf.org>; Wed, 19 Feb 2014 16:18:48 -0800 (PST)
X-IronPort-AV: E=Sophos;i="4.97,508,1389704400"; d="scan'208";a="184513354"
Received: from unknown (HELO ipccvi.tcif.telstra.com.au) ([10.97.217.208]) by ipoavi.tcif.telstra.com.au with ESMTP; 20 Feb 2014 11:18:44 +1100
X-IronPort-AV: E=McAfee;i="5400,1158,7354"; a="194825846"
Received: from wsmsg3753.srv.dir.telstra.com ([172.49.40.174]) by ipccvi.tcif.telstra.com.au with ESMTP; 20 Feb 2014 11:18:44 +1100
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by WSMSG3753.srv.dir.telstra.com ([172.49.40.174]) with mapi; Thu, 20 Feb 2014 11:18:43 +1100
From: "Manger, James" <James.H.Manger@team.telstra.com>
To: JSON WG <json@ietf.org>
Date: Thu, 20 Feb 2014 11:18:42 +1100
Thread-Topic: [Json] Nudging the English-language vs. formalisms discussion forward
Thread-Index: Ac8tySf98BiS6ALPTPCf+5GGVQoPZAABCPAQ
Message-ID: <255B9BB34FB7D647A506DC292726F6E1153B778363@WSMSG3153V.srv.dir.telstra.com>
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>
In-Reply-To: <CAK3OfOgOghu_4jxHuoDSnHbyJJRu=xa_YBmgO92CMspMQApceg@mail.gmail.com>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: http://mailarchive.ietf.org/arch/msg/json/hj5wT_iAMf7zWe0TRpsuhQN1Y-Y
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 00:18:51 -0000

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