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

Barry Leiba <barryleiba@computer.org> Wed, 19 February 2014 22:04 UTC

Return-Path: <barryleiba.mailing.lists@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 05E611A0272 for <json@ietfa.amsl.com>; Wed, 19 Feb 2014 14:04:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] 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 BwzK9qYMrdss for <json@ietfa.amsl.com>; Wed, 19 Feb 2014 14:04:39 -0800 (PST)
Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) by ietfa.amsl.com (Postfix) with ESMTP id A743B1A02B9 for <json@ietf.org>; Wed, 19 Feb 2014 14:04:38 -0800 (PST)
Received: by mail-vc0-f174.google.com with SMTP id im17so1088642vcb.33 for <json@ietf.org>; Wed, 19 Feb 2014 14:04:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=1kajKPjRj2jVAL0czkFxXYTyddza84ev6pDj1p0oQo8=; b=KwDapa9uJP30s4KnUF47KMXqXVnjR2G9UuJ054pMDu/8Hg1Es+ERLZHO16AcrR788n 7NNsqcC5V8bTMHTlTWXylxYdYOOTDsY8eOrm3v8FlYxbYPgyWd2xPHfD6Tw+B4JSStPj XNWn8tevQXEu0VEo0GSUj0O18KdvQq1jScHFl57WyTRk4c84j49bK9dPZh8E5qcsCat5 Efq/ikINqDwYb1HmoKspGxv4U9m4O3bkcU3Vx/G+Y/19w5cHEUekUWKiE+Ex6wru6O+x PQchikkDSQNqBpllYNzut0dB2EDAOWH0hY3gbUejpNhguRxyzm5IPxadxtrVgtkMdCg8 fPxQ==
MIME-Version: 1.0
X-Received: by 10.221.2.138 with SMTP id nu10mr2004963vcb.52.1392847475160; Wed, 19 Feb 2014 14:04:35 -0800 (PST)
Sender: barryleiba.mailing.lists@gmail.com
Received: by 10.58.19.104 with HTTP; Wed, 19 Feb 2014 14:04:35 -0800 (PST)
In-Reply-To: <A4B53816-6FBF-4A37-8BC9-F0A9D0867BCD@tzi.org>
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>
Date: Wed, 19 Feb 2014 17:04:35 -0500
X-Google-Sender-Auth: 5M9tMmdKS0qSECJ40QIatYZuncg
Message-ID: <CAC4RtVDLQ3q5KxG+jDYfDB09JZUOBcojTR3ebxhr1QUOXLeEvA@mail.gmail.com>
From: Barry Leiba <barryleiba@computer.org>
To: JSON WG <json@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/json/M3qcFVwm4uqWQMVW3ewaiiX8U4I
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: Wed, 19 Feb 2014 22:04:43 -0000

Using Carsten's "summary" note as an anchor, let me back up to where
this proposal came from.

I'm interested in providing a recommended way (through a non-binding,
Informational document that describes it) in which protocol elements
that are JSON things can be described in documents.  I'm hoping we can
keep this work item to that limited scope, and not go too far in
trying to devise something mega-general that does everything but
eat.[1]

That means that I'm looking for something that addresses the 90% case
nicely and cleanly.  The 10% of the messier cases should be workable,
but can be messier, I think.  As an example of what made me think
about this, look at these:
1. Section 6.1.1 of http://tools.ietf.org/html/draft-ietf-repute-media-type-12
2. Section 6.2.2 of http://tools.ietf.org/html/draft-ietf-repute-media-type-13

Note that the attempt to reproduce the JSON ABNF, in version -12, had
a number of problems.  I think the mechanism in version -13 is much
cleaner... and it's simple and easy to explain.  Nested and complex
structures can be handled as they are in ABNF, by naming the nested or
complex bit and then expanding it in another "rule".  I think this
sort of mechanism meets the "addresses the 90% case nicely" desire.  I
like it because it's easy to write and, more importantly, easy to read
and understand.

We could possibly come up with something more general; we could
consider Andy Newton's draft, or variations of that (as Andy
suggested, perhaps with changes to make it more readable).  But I'd
really like us to avoid getting so general that we end up with
something that's precise and covers everything... but is difficult to
get right and hard to read.

Barry

[1] Points to you if you know the reference:
http://mindprod.com/jgloss/debe.html

On Wed, Feb 19, 2014 at 3:02 PM, Carsten Bormann <cabo@tzi.org> wrote:
> At the danger of repeating myself and others here, I'll try to summarize:
>
> -- We have quite good experience with using a single, standard (!) ABNF in IETF protocols.
>   ABNF is a production system with well-understood semantics.
>   It is somewhat idiosyncratic in the world of EBNF, but that has caused *zero* problems in practice.
>   (People have just written ABNF parsers.  You still have the second half of the afternoon to do something else after that.)
>
> -- A production system that generates JSON (at the data model level) is easy to do.
>   (But we have to find people who have the background and can commit the time.)
>
> -- Relax NG compact is a nice existence proof that a production system like this can work and be highly usable.
>   A JSON version could be even simpler.
>
> -- Previous attempts at trying to express XML or JSON data model syntax in the formalism of XML or JSON itself provide incontrovertible proof that this approach does not work.
>   Don't do that then.
>   (It is so much easier to spend half the afternoon writing the parser for the workable syntax.
>    We can even spec it in ABNF!)
>
> -- If you want to cover 100 % of the "syntax" of an XML document, you need to add Schematron to Relax NG compact.
>   a) Don't do that then for JSON -- stay with an 80 % solution like Relax NG (which is more like 90 %) or maybe even simpler.
>   b) Choose some form of "Jpath" to complement the production system with assertions.
>
> (Note that choice b can always be added later, on a separate timeline from doing a production system.)
>
> My proposals following from this little exercise in fact finding:
>
> -- I would propose that we try to find energy for doing the production system.
> (In addition to the Web people, we may want to tap the YANG people for some recent experience in doing this kind of work.)
>
> -- I would propose that we stay open to adding a Jpath/Schematron approach (choice "b"), *if* somebody brings a credible one to the table.
>
> -- I also would propose that we collect a small number of benchmarks that we use for demonstrating that proposals for the production system are useful.
>   My first suggestion: RFC 7071.  But we need a couple of different ones.  RFC 7095?  Maybe too ambitious.
>
> Grüße, Carsten
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json