Re: [Json] Seeking more input on draft-ietf-json-text-sequence

Nico Williams <nico@cryptonector.com> Wed, 21 May 2014 19:19 UTC

Return-Path: <nico@cryptonector.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 00B721A0830 for <json@ietfa.amsl.com>; Wed, 21 May 2014 12:19:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.044
X-Spam-Level:
X-Spam-Status: No, score=-1.044 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, IP_NOT_FRIENDLY=0.334, 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 XaoBNxaRH_qz for <json@ietfa.amsl.com>; Wed, 21 May 2014 12:19:14 -0700 (PDT)
Received: from homiemail-a34.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 4A1751A0732 for <json@ietf.org>; Wed, 21 May 2014 12:19:14 -0700 (PDT)
Received: from homiemail-a34.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a34.g.dreamhost.com (Postfix) with ESMTP id 786591006E for <json@ietf.org>; Wed, 21 May 2014 12:19:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=fuK39yP29okxtUgmnlSW dKUNVVU=; b=ghOhcjpJVHXw9PKsJiSOaAR5hPfw3rfyBA3cXMuF+hY/fWsAvS++ btKCeyJY597Uw4zzxglEa35uBmyi64CWx1zxKyNbW1LgVddrv3HC+iGsYRzhp8jj kOOfApMjQBydcAtCG9LaH/Pj2APyZFEG+SfZPpq8vikmPS4L6d/TqeI=
Received: from mail-oa0-f52.google.com (mail-oa0-f52.google.com [209.85.219.52]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a34.g.dreamhost.com (Postfix) with ESMTPSA id 5C06910062 for <json@ietf.org>; Wed, 21 May 2014 12:19:13 -0700 (PDT)
Received: by mail-oa0-f52.google.com with SMTP id eb12so2801905oac.11 for <json@ietf.org>; Wed, 21 May 2014 12:19:11 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.60.41.104 with SMTP id e8mr54643872oel.18.1400699951862; Wed, 21 May 2014 12:19:11 -0700 (PDT)
Received: by 10.182.234.4 with HTTP; Wed, 21 May 2014 12:19:11 -0700 (PDT)
In-Reply-To: <A89181FF-2FAB-4C17-86AC-685D09AD0CA4@vpnc.org>
References: <20140509173159.28855.94523.idtracker@ietfa.amsl.com> <A89181FF-2FAB-4C17-86AC-685D09AD0CA4@vpnc.org>
Date: Wed, 21 May 2014 14:19:11 -0500
Message-ID: <CAK3OfOi46pdC_oBOMHAo2o5Ld_UgaAm00o7D9a0HNubr=0vKBw@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Content-Type: text/plain; charset=UTF-8
Archived-At: http://mailarchive.ietf.org/arch/msg/json/EXgvtxWNNZb0YV_I0yQYsXQx7R0
Cc: IETF JSON WG <json@ietf.org>
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
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, 21 May 2014 19:19:15 -0000

I'll give two ABNFs:

  JSON-sequence = *(JSON-text LF)
  LF = <given by RFC5234>
  JSON-text = <given by RFC7159>

and,

  JSON-sequence = *ws *(value text-sep *ws)
  text-sep = *(SP / HTAB / CR) LF ; these are from RFC5234
  ws = <given by RFC7159>
  value = <given by RFC7159>

<hand-waving>
The latter being the alternative to the first for dealing with ABNF
greediness.  Greediness is not specified in RFC5234 NAICT.  Nor do we
speak of which rules are "exported"/"imported" by "modules".
</hand-waving>

I think this is good enough.  I doubt anyone will ever use ABNF
tooling to produce a JSON text sequence parser.  Two alternative
formulations + prose should be sufficient, if not excessive.

For the resync ABNF I'll give this:

  boundary = endchar text-sep *ws startchar
  text-sep = *(SP / HTAB / CR) LF ; these are from RFC5234
  endchar = ( "}" / "]" / DQUOTE / "e" / "l" / DIGIT )
  startchar =  ( "{" / "[" / DQUOTE / "t" / "f" / "n" / "-" / DIGIT )

Nico
--