Re: [Json] Proposal: JSON text sequence MIME type and Proposed Standard

Tim Bray <tbray@textuality.com> Wed, 12 March 2014 04:25 UTC

Return-Path: <tbray@textuality.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 7DE511A08D3 for <json@ietfa.amsl.com>; Tue, 11 Mar 2014 21:25:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 S2qMOVHCxd3F for <json@ietfa.amsl.com>; Tue, 11 Mar 2014 21:25:52 -0700 (PDT)
Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by ietfa.amsl.com (Postfix) with ESMTP id 892F21A03AC for <json@ietf.org>; Tue, 11 Mar 2014 21:25:52 -0700 (PDT)
Received: by mail-ve0-f178.google.com with SMTP id jw12so9427166veb.23 for <json@ietf.org>; Tue, 11 Mar 2014 21:25:46 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=W+Sq20jJ0J53GSv8nIEAbaO093zspop5YfFzpYRdNe0=; b=Iy+ZM3etYxgUHToXZhmyRNyAY0GiGRs7KYNWRqB4KaWCGFAF3u3G2Nbt0P7ye0z3tz FUegKhMPEXcCtmRx6IDE/xhXb8tPmLUJkGo//SDwo3vg/uA82z67oUleeydpyL4fvj8Z 00ZipJFGrCuHd4qGbink61KuyA/ebWCW4Eyg6NkaFDdyli2D8wkDO/RKNW2p/h0CjqTO SRh2GQUZB/6Kl5Xid1gOpEjhtSDljFqiRml6eSazzAsKx/jj5G3hyciV0i+bUSERn1oW ufplmV+g5we0S7FfLqtGZD1v4h2PaxAHv4w8SwaQTwCGoGEdz/8Nb0lDVw71Bd6RHPXW FKOQ==
X-Gm-Message-State: ALoCoQl0rnmNuNG6nGfIDCV3eaCFwEtNswrsnyjx3HQeWisDGTsHO9B7KSmB3/rvNnd/C5HQhfyc
MIME-Version: 1.0
X-Received: by 10.52.34.137 with SMTP id z9mr8608709vdi.12.1394598346472; Tue, 11 Mar 2014 21:25:46 -0700 (PDT)
Received: by 10.220.98.73 with HTTP; Tue, 11 Mar 2014 21:25:46 -0700 (PDT)
X-Originating-IP: [24.84.235.32]
In-Reply-To: <CAK3OfOg-BQA6FTvCOs-Diukjj9g+gwKKo-4BKMBcuruthtuhsQ@mail.gmail.com>
References: <255B9BB34FB7D647A506DC292726F6E1153F8CA38B@WSMSG3153V.srv.dir.telstra.com> <CAK3OfOjZ4nDQ7OBpbF-0D9dK9+08MhXiRe9VxKvWTXwBosd-RA@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E115401A0B02@WSMSG3153V.srv.dir.telstra.com> <CAHBU6isGGLCVkc53sPoOVPktQvR4ATYBWpxSmG2TRsMSQ605gg@mail.gmail.com> <CAK3OfOg-BQA6FTvCOs-Diukjj9g+gwKKo-4BKMBcuruthtuhsQ@mail.gmail.com>
Date: Tue, 11 Mar 2014 21:25:46 -0700
Message-ID: <CAHBU6iv6iUkQZPgt4J6cPpURLK5EzdkuGot2Np7OUQaVaiy97g@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: Nico Williams <nico@cryptonector.com>
Content-Type: multipart/alternative; boundary="20cf30780f620bd40504f4613b51"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/33ki88Mu6dL1aFKXjdVr881DvIQ
Cc: "Manger, James" <James.H.Manger@team.telstra.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Proposal: JSON text sequence MIME type and Proposed Standard
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, 12 Mar 2014 04:25:57 -0000

Except for, in this kind of application, I think it’s really foolish to
write out anything but objects. In which case you could theoretically have
no separators.

I lean to \s+ because as soon as you see the first char, you’re at the
start of the next legal JSON text.


On Tue, Mar 11, 2014 at 9:02 PM, Nico Williams <nico@cryptonector.com>wrote:

> On Tue, Mar 11, 2014 at 10:49 PM, Tim Bray <tbray@textuality.com> wrote:
> > Yeah, the options are:
> >
> > 1. zero or more whitespace characters
>
> Not an option for values where that would result in ambiguity.  (E.g.,
> two top-level numeric values in a row.)
>
> > 2. 1 or more whitespace characters
> > 3. A specific required set of whitespace characters, for example
> \s*\n\s* or
> > just \n
>
> Given that there's no such thing as an empty JSON text, clearly any
> number of JSON text separators is logically the same as one.  That
> makes (2) and (3) OK.
>
> jq allows any whitespace to separate JSON texts in input sequences,
> but it always uses \n to separate texts when outputting JSON text
> sequences.  So I'm inclined to go for (2).
>
> Nico
> --
>