Re: [Json] serializing sequences of JSON values

Tim Bray <tbray@textuality.com> Fri, 14 March 2014 23:21 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 760521A0212 for <json@ietfa.amsl.com>; Fri, 14 Mar 2014 16:21:00 -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 RMZ-GahIQdvU for <json@ietfa.amsl.com>; Fri, 14 Mar 2014 16:20:58 -0700 (PDT)
Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by ietfa.amsl.com (Postfix) with ESMTP id 61A5E1A0209 for <json@ietf.org>; Fri, 14 Mar 2014 16:20:58 -0700 (PDT)
Received: by mail-vc0-f169.google.com with SMTP id ik5so3594644vcb.28 for <json@ietf.org>; Fri, 14 Mar 2014 16:20:51 -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=LDv+60yuv883uVsZTWYkH7VneA/8VtDyanIwV3daKO0=; b=Yscf4Cen1SHqLbhx7LH6UEVw/cKAGJb7TAAzOdy4OUVb+2mebtqt5l8qCZ8hv9iwMQ mtjzJYB6woPrC8zyopk5KiHWmA1rR+mT6c/QLjeIX2cdv2FqR8iL68HZJ8KFJ8qmTi9M bG7JAs1sxutzXxB52CZ4JxXbEslbf07tCQOjLlcqmaCinvciDGqjNX5TPJ893VpCbSzN zbAZ05NvJjSr5a8l7QVjcODFe0SynhT4IeIwyvy2yYrxEcfhBd8nJ2u02imjnbVjLkMz CDK4wvM69dGl/oBVeThNJjCx00RUA7l2dj5WVo/83iZqnSOU/HxuTDOtajkc7x/D9vrb ba3Q==
X-Gm-Message-State: ALoCoQl4WWnmgQAE+ORcnLQt2qn10UwIAmwrVDTZX3buDtKfoI5/Di+SiwDb5jZM5cEdDgC8sAwT
MIME-Version: 1.0
X-Received: by 10.220.250.203 with SMTP id mp11mr8543726vcb.2.1394839251209; Fri, 14 Mar 2014 16:20:51 -0700 (PDT)
Received: by 10.220.98.73 with HTTP; Fri, 14 Mar 2014 16:20:51 -0700 (PDT)
X-Originating-IP: [96.49.81.176]
In-Reply-To: <3DE14AC0-BF6F-4BFB-AF47-53BD3513BA05@tzi.org>
References: <em2c025504-6532-4513-a339-3d71c4cdfbda@helsinki> <5FC8412F-30E5-4F80-AB63-6715B1053098@vpnc.org> <58a4b20f768b484c94a850c4eba71ec5@BL2PR02MB307.namprd02.prod.outlook.com> <53222FFC.8070204@cisco.com> <5322714F.6080508@it.aoyama.ac.jp> <CAGrxA26HRqa+R580qfEMXU_JGid-UDzwwmQigOkOW0OWuA9mpg@mail.gmail.com> <CAK3OfOier6uQ4nVuuCP+uWV+eRbYh8qqAi4FVdWqNLHOh94L+A@mail.gmail.com> <CAGrxA275TwvbUkAT7tp9NtgTDN1WwPNP33aKmAZdB7QJkSY0CA@mail.gmail.com> <CAK3OfOj3e7pqj5R-ggHhXfaN5p1CG+6djiLizaRE2nJnF1ivGA@mail.gmail.com> <CAK3OfOhYxRR1ii3=eezXAmUR1ArpZDmAzbjRdHL2ASQ7Y1deDw@mail.gmail.com> <CAGrxA270ARHz-XepgY-4PpTGqJG+4xGbFQ15kWYXPs_52vHtEg@mail.gmail.com> <3DE14AC0-BF6F-4BFB-AF47-53BD3513BA05@tzi.org>
Date: Fri, 14 Mar 2014 16:20:51 -0700
Message-ID: <CAHBU6itS2tuXFh+5aq2Ms2JNd_4kAegW_MnKw558RiBDC7ECqw@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: Carsten Bormann <cabo@tzi.org>
Content-Type: multipart/alternative; boundary=089e013d05021665a704f49952ab
Archived-At: http://mailarchive.ietf.org/arch/msg/json/jkIDHwPXUpnTQyi1GfQQxCkC_7g
Cc: Nico Williams <nico@cryptonector.com>, Matt Miller <mamille2@cisco.com>, Tatu Saloranta <tsaloranta@gmail.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] serializing sequences of JSON values
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: Fri, 14 Mar 2014 23:21:00 -0000

I’m strongly negative about requiring people to avoid newlines in their
JSON in order to be able to string chunks of JSON together into a stream.
 JSON is unambiguously and easily parsable.  To talk in abnf, I don’t think
we should be satisfied with anything less than this:

JSON-sequence = JSON-text *(text-separator JSON-text)
text-separator = 1*(  %x20 / %x09 / %x0A / %x0D )



On Fri, Mar 14, 2014 at 4:01 PM, Carsten Bormann <cabo@tzi.org> wrote:

>
>
> On 14.03.2014, at 20:30, Tatu Saloranta <tsaloranta@gmail.com> wrote:
>
> On Fri, Mar 14, 2014 at 4:37 PM, Nico Williams <nico@cryptonector.com>wrote;wrote:
>
>> The most interoperable form of JSON text sequence would be this:
>> encoders MUST not use newlines in their JSON text encodings and MUST
>> follow each JSON text with a newline.
>>
>
> And presumably this would include all linefeeds that JSON specification
> supports? (\r, \n and \r\n).
>
>
>
> I hope not.
>
> \r newlines no longer exist in the real world.
> \r\n on the other hand is just a special case of \n, a sane parser can
> then just key on \n.
>
> Grüße, Carsten
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>
>