Re: [Json] Working Group Last Call on draft-ietf-json-text-sequence

Carsten Bormann <cabo@tzi.org> Sat, 24 May 2014 17:02 UTC

Return-Path: <cabo@tzi.org>
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 E65DE1A035C for <json@ietfa.amsl.com>; Sat, 24 May 2014 10:02:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.149
X-Spam-Level:
X-Spam-Status: No, score=0.149 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, HELO_EQ_DE=0.35, MIME_8BIT_HEADER=0.3, SPF_HELO_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 BlqOWiyxmBmd for <json@ietfa.amsl.com>; Sat, 24 May 2014 10:02:25 -0700 (PDT)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1A72B1A016C for <json@ietf.org>; Sat, 24 May 2014 10:02:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id s4OH2Dko029463; Sat, 24 May 2014 19:02:13 +0200 (CEST)
Received: from [192.168.217.148] (p54892C9D.dip0.t-ipconnect.de [84.137.44.157]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id 154C11DD9; Sat, 24 May 2014 19:02:12 +0200 (CEST)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <537EF070.6060503@it.aoyama.ac.jp>
Date: Sat, 24 May 2014 19:02:11 +0200
X-Mao-Original-Outgoing-Id: 422643731.338718-da57f3f51f22e82782e58bdbd5c39c58
Content-Transfer-Encoding: quoted-printable
Message-Id: <4E4FB86A-7DD7-462D-83F7-1FAFD947FF46@tzi.org>
References: <F6B74FE0-AEBE-43CC-BDE6-BA443BC04F2D@vpnc.org> <537EF070.6060503@it.aoyama.ac.jp>
To: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
X-Mailer: Apple Mail (2.1878.2)
Archived-At: http://mailarchive.ietf.org/arch/msg/json/jBoFOunU3I2JmqtLSTVH2WlR8Pk
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, IETF JSON WG <json@ietf.org>
Subject: Re: [Json] Working Group Last Call 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: Sat, 24 May 2014 17:02:27 -0000

On 23 May 2014, at 08:53, Martin J. Dürst <duerst@it.aoyama.ac.jp> wrote:

> it's not too difficult to parse the delimiters separately and only have the values parsed by a JSON parser

Indeed.  I continue to believe that this is the only reasonable way to operate on sequences of JSON instances.
Either

1) use a delimiter that cannot occur in JSON (staying in UTF-8 with ASCII control characters as in NUL, FF or RS; or breaking out of UTF-8 as in using 0xFF bytes);
2) use LF as the delimiter, and remove the LFs from the JSON instances.

Using LFs as inter-stream delimiters, while also retaining their insignificant whitespace role within JSON instances, strikes me as the most complicated way to approach this problem.
There may be practical reasons to use this most-complicated way, but it seems suboptimal to standardize on it.

(I’m not a big fan of wrapping separate JSON instances in outermost JSON arrays for the kinds of applications addressed here.
This can obviously already be used for those cases where it works (no need for concatenation, no need for resilience), but except in those cases where a combined JSON instance had been the right thing to use in the first place, it combines all the same problems of dual-use LFs with the need to add wrapping brackets.)

Grüße, Carsten