Re: [Json] Seeking more input on draft-ietf-json-text-sequence
Stefan Drees <stefan@drees.name> Sun, 18 May 2014 08:57 UTC
Return-Path: <stefan@drees.name>
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 0A00B1A019A for <json@ietfa.amsl.com>; Sun, 18 May 2014 01:57:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.55
X-Spam-Level:
X-Spam-Status: No, score=-1.55 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_NONE=-0.0001] 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 DeWx2DQteqWx for <json@ietfa.amsl.com>; Sun, 18 May 2014 01:57:00 -0700 (PDT)
Received: from mout.web.de (mout.web.de [212.227.15.4]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA256 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0B1A51A022A for <json@ietf.org>; Sun, 18 May 2014 01:56:59 -0700 (PDT)
Received: from newyork.local.box ([80.187.96.163]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MSrgv-1WMoiS2VWv-00Rt6G for <json@ietf.org>; Sun, 18 May 2014 10:56:57 +0200
Message-ID: <537875D8.1080807@drees.name>
Date: Sun, 18 May 2014 10:56:56 +0200
From: Stefan Drees <stefan@drees.name>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
MIME-Version: 1.0
To: json@ietf.org
References: <20140509173159.28855.94523.idtracker@ietfa.amsl.com> <A89181FF-2FAB-4C17-86AC-685D09AD0CA4@vpnc.org>
In-Reply-To: <A89181FF-2FAB-4C17-86AC-685D09AD0CA4@vpnc.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:F6ClUL6hxQehBIa3rMBGw6Ilb2XlAWhwUeElhCtj8ksP3G6DNbS BGJWwizrL9UjIiCMy5QXsUjMgVDnO93lQsmIuj+f1+pvrSxXLWwwWCbCza2toLNLYefsTqu B1PB6GjuA4hVEeFe2zUe/5R1JWxbDEg6ruBhpumhEUYywGOjJG4AJhnKqLOX6Bf+JnJFCbj DEYwa+IjdIpDqzqp7R6Rw==
Archived-At: http://mailarchive.ietf.org/arch/msg/json/Bz6LdKlB0DfCJ0bxuxIY1diVC0E
Subject: Re: [Json] Seeking more input on draft-ietf-json-text-sequence
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: stefan@drees.name
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: Sun, 18 May 2014 08:57:02 -0000
On 2014-05-14 20:32 +01:00, Paul Hoffman wrote: > Greetings again. Wearing my chair hat, I encourage people in the > group(especially you quiet types) to review this WG draft and let the WG know > what you think. The idea of JSON text sequences has many applications, > and folks have invented things like this in the past for their own > internal purposes. We would like to make sure that this document covers > as many use cases as possible. > > --Paul Hoffman I like to understand grammars also bottom up - which might qualify as a lexer's perspective - overlapping rules like the one for ws1 and ws2 in the suggested grammar do not really make things clearer for me. Additionally the reader will benefit from the expressed clear assumption, how these ws(''|1|2) relate to each other. So, I suggest to change (as found in draft-02): # --- 8< ---- 2. JSON Text Sequence Format The ABNF [RFC5234] for the JSON text sequence format is as follows: JSON-sequence = *ws1 *(JSON-text *ws2 %x0A *ws1) ws1 = %x20 / %x09 / %x0A / %x0D ws2 = %x20 / %x09 / %x0D JSON-text = <given by RFC7159> Figure 1: JSON text sequence ABNF # --- 8< ---- into either: # --- 8< ---- 2. JSON Text Sequence Format The ABNF [RFC5234] for the JSON text sequence format is as follows: JSON-sequence = *(ws-no-nl / nl) *(JSON-text *ws-no-nl nl *(ws-no-nl / nl)) nl = %x0A ws-no-nl = ( %x20 / %x09 / %x0D ) JSON-text = <given by RFC7159> Figure 1: JSON text sequence ABNF When combining the grammars, the rule for ws in the JSON-text is therefore equivalent to *( ws-without-newline / newline ) # --- 8< ---- or less cryptic but wrapped some more: # --- 8< ---- 2. JSON Text Sequence Format The ABNF [RFC5234] for the JSON text sequence format is as follows: JSON-sequence = *( ws-without-newline / newline ) *( JSON-text *ws-without-newline newline *( ws-without-newline / newline ) ) newline = %x0A ws-without-newline = ( %x20 / %x09 / %x0D ) JSON-text = <given by RFC7159> Figure 1: JSON text sequence ABNF When combining the grammars, the production for ws in the JSON-text is therefore equivalent to *( ws-without-newline / newline ) # --- 8< ---- ... but I am *not* passionate about this. It is just that the mix of optional sets, where one is a proper subset of the other to me smells very implicit, where being explicit (choosing a direct decomopsition like "X/x and x" to me reads well and is not that much longer. What do the others think? PS: If the parentheses in the simple rules do not match our current styleguide, just remove them, it is the decomposition I am interested in. All the best, Stefan > On May 9, 2014, at 10:31 AM, internet-drafts@ietf.org wrote: > >> >> A New Internet-Draft is available from the on-line Internet-Drafts directories. >> This draft is a work item of the JavaScript Object Notation Working Group of the IETF. >> >> Title : JavaScript Object Notation (JSON) Text Sequences >> Author : Nicolas Williams >> Filename : draft-ietf-json-text-sequence-02.txt >> Pages : 10 >> Date : 2014-05-09 >> >> Abstract: >> This document describes the JSON text sequence format and associated >> media type. >> >> >> The IETF datatracker status page for this draft is: >> https://datatracker.ietf.org/doc/draft-ietf-json-text-sequence/ >> >> There's also a htmlized version available at: >> http://tools.ietf.org/html/draft-ietf-json-text-sequence-02 >> >> A diff from the previous version is available at: >> http://www.ietf.org/rfcdiff?url2=draft-ietf-json-text-sequence-02 > > > _______________________________________________ > json mailing list > json@ietf.org > https://www.ietf.org/mailman/listinfo/json >
- [Json] I-D Action: draft-ietf-json-text-sequence-… internet-drafts
- [Json] Seeking more input on draft-ietf-json-text… Paul Hoffman
- Re: [Json] Seeking more input on draft-ietf-json-… Stefan Drees
- Re: [Json] Seeking more input on draft-ietf-json-… Stefan Drees
- Re: [Json] Seeking more input on draft-ietf-json-… Nico Williams
- Re: [Json] Seeking more input on draft-ietf-json-… Nico Williams
- Re: [Json] Seeking more input on draft-ietf-json-… Nico Williams
- Re: [Json] Seeking more input on draft-ietf-json-… Stefan Drees
- Re: [Json] Seeking more input on draft-ietf-json-… Nico Williams
- Re: [Json] Seeking more input on draft-ietf-json-… Manger, James
- Re: [Json] Seeking more input on draft-ietf-json-… Nico Williams