Re: [Json] Schema Requirements (Was: Re: Nudging the English-language vs. formalisms discussion forward)

Phillip Hallam-Baker <hallam@gmail.com> Thu, 20 February 2014 17:23 UTC

Return-Path: <hallam@gmail.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 CB92B1A0222 for <json@ietfa.amsl.com>; Thu, 20 Feb 2014 09:23:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=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 OKYQhsvZYfx6 for <json@ietfa.amsl.com>; Thu, 20 Feb 2014 09:23:24 -0800 (PST)
Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) by ietfa.amsl.com (Postfix) with ESMTP id D2FEE1A021B for <json@ietf.org>; Thu, 20 Feb 2014 09:23:23 -0800 (PST)
Received: by mail-lb0-f177.google.com with SMTP id 10so1505134lbg.22 for <json@ietf.org>; Thu, 20 Feb 2014 09:23:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CpaqKoavXoxjmfbpNNAg6Sn0cRyBxBAs62SoH5aSfP8=; b=ngMtb0h7TdXIhHX9HHacdZLbwtFmOR0VUt9A0nFGZAJLKbmidmqluQ7eKavP61DASJ mXTxlJTY4uQ1xQIKiQnTRRLt41LPPjpurPU7RyTzre0UMUDuFrW+yVl1uV9brgZU/1/U /G59x6df1IZLE3jp9zcq0G0ZZMTf4KCMWz4iVevgXC+IXt5rLieaK/MUIhqYS2FlClFg Xg+aqbPBWOVf4i9wnSm5mPUIXj7IGOfevdAkIGuqt+x4H/zSLs8ygZg7/ts1b6P9fqd0 spYO76g3SFrEpd+bVLI2o2NSEVeTM9uAxwJ/HXbVCQ30n1C2Dwapp/u2Wzzo81p2dbBC i5PA==
MIME-Version: 1.0
X-Received: by 10.112.129.168 with SMTP id nx8mr1718423lbb.37.1392916999470; Thu, 20 Feb 2014 09:23:19 -0800 (PST)
Received: by 10.112.37.168 with HTTP; Thu, 20 Feb 2014 09:23:19 -0800 (PST)
In-Reply-To: <FE06CD427A4044B995F57C4926A1C8C2@codalogic>
References: <C87F9B96-E028-4F0E-A950-B39D3F68FFE7@vpnc.org> <CAMm+LwhUh_yN-hzaoDWfrO_H2iGvYvj99BCE4EcYmgqCPqXoVQ@mail.gmail.com> <CAHBU6itpttXBfVQGKw=u==k_XSdrht81+m_YDNZP6RM+=9CNow@mail.gmail.com> <CAK3OfOjHkBFOzJSx=bhhoQJ8Z2bWyEXK52dNyYGWVb9FAj99ow@mail.gmail.com> <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> <357740A8AA0F4316BE630917321FAB4D@codalogic> <B1EBE05A69362F001777F807@cyrus.local> <47BB9131737D42218A6382DEF45BBE2C@codalogic> <CAMm+LwgmHjoLu2=zTOERN8LO74hWpp45yy2epd2JzqDRM9oFfg@mail.gmail.com> <AF211B67DB3D453D9DE8F8FA53886F73@codalogic> <CAMm+LwguTBkGQBHN+e2kU6XxECsic9Kcvda+7X6KDNe0TQxq4w@mail.gmail.com> <FE06CD427A4044B995F57C4926A1C8C2@codalogic>
Date: Thu, 20 Feb 2014 12:23:19 -0500
Message-ID: <CAMm+Lwg2c-tVu2-HdarSoa6Gi0OM36uWW-14tRWBYn_CkPtYmg@mail.gmail.com>
From: Phillip Hallam-Baker <hallam@gmail.com>
To: Pete Cordell <petejson@codalogic.com>
Content-Type: multipart/alternative; boundary="047d7b343d68f4854d04f2d9c204"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/ibQ1ysI9bSLK226edlZ5lvYECvI
Cc: Carsten Bormann <cabo@tzi.org>, JSON WG <json@ietf.org>
Subject: Re: [Json] Schema Requirements (Was: Re: 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 17:23:27 -0000

On Thu, Feb 20, 2014 at 11:55 AM, Pete Cordell <petejson@codalogic.com>wrote:

> My position is that, having recognised that Dates represent a case where
> microformats are useful, perhaps we should not assume that these are the
> only cases.  IP addresses?  Crypto OIDs?  Dates on Mars?
>

All I am saying is that it is a slippery slope.

There are two ways to go down a slippery slope, not at all or on skis.

Skis: I will add a new type, 'Format <Name>' that declares a string with
the named sub-format which can be documented elsewhere in ABNF.


This also solves my 50 shades of yuck problem trying to parse HTTP headers
with all the mindboggling syntax baroqueness. Sometimes a label has quotes,
sometimes not, sometimes angle braces. There is no logic at all just like
there is no logic to the choice of attributes or elements in XML2RFC format.


Exactly.  It's saying there's something special here that is beyond my (the
> JSON schema's) ability to define.  It's also admitting that it's a rare
> case and the JSON schema doesn't want to be able to define it.  However,
> just because it doesn't want to do it, doesn't mean it wants to prevent you
> from defining something if it's useful to you.  EBNF with narrative in an
> RFC would be a suitable way to define it's format.
>

Or a reference to some other spec where it was predefined.

That would also provide a way to deal with enumerations which I have
currently punted on.


-- 
Website: http://hallambaker.com/