Re: [Json] The text in draft-ietf-json-text-sequence

Nico Williams <nico@cryptonector.com> Tue, 15 July 2014 06:38 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 05D661A0309 for <json@ietfa.amsl.com>; Mon, 14 Jul 2014 23:38:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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 5SE0PcP108eh for <json@ietfa.amsl.com>; Mon, 14 Jul 2014 23:38:55 -0700 (PDT)
Received: from homiemail-a24.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id D595D1B281C for <json@ietf.org>; Mon, 14 Jul 2014 23:38:55 -0700 (PDT)
Received: from homiemail-a24.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a24.g.dreamhost.com (Postfix) with ESMTP id B6FF32C806C; Mon, 14 Jul 2014 23:38:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=MQkRSqygvpL/Hn KNoLnu1T+WRxo=; b=ROrjI166mwPWdMt4fKbrLdySibfBPAFbnPy8LLndFxsikZ PS4MGECF5wvPRcefZI3TIie7pyli8YC5grc9DaClhCM/9+pVJCLeFmnPylZ+TSri A768Q6He8isoBOFE3EGOFcfk/Xk88uOPF1oku9Gg1mSRena7EO2/97MnFpcJI=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a24.g.dreamhost.com (Postfix) with ESMTPA id 7065E2C806B; Mon, 14 Jul 2014 23:38:55 -0700 (PDT)
Date: Tue, 15 Jul 2014 01:38:54 -0500
From: Nico Williams <nico@cryptonector.com>
To: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
Message-ID: <20140715063853.GE2256@localhost>
References: <FD9026FF-BDC5-451C-ABBC-0608AB63B819@vpnc.org> <CFE1A78C.52DE5%jhildebr@cisco.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CFE1A78C.52DE5%jhildebr@cisco.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: http://mailarchive.ietf.org/arch/msg/json/TLY-Drr6o_RSjyp-t5zgbF3EdUg
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, IETF JSON WG <json@ietf.org>
Subject: Re: [Json] The text in 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: Tue, 15 Jul 2014 06:38:57 -0000

On Tue, Jul 08, 2014 at 11:50:54AM +0000, Joe Hildebrand (jhildebr) wrote:
> On 7/7/14, 10:57 PM, "Paul Hoffman" <paul.hoffman@vpnc.org> wrote:
> >- Do you feel that the protocol will be significantly broken if it uses
> >LF as the text separator?
> 
> Somewhat.

Considering that...

 - ...LFs cannot appear unescaped in strings,
 - therefore LFs in JSON texts are just whitespace,
 - therefore LFs in JSON texts may safely be removed or replaced with
   other JSON whitespace,

and considering that if we used RS a logger would still have to check
that a text to be logged does not include RS,...

...what might be broken if we use LF instead of RS?

Loggers would have to s/LF/SP/g or s/LF//g or equivalent.  But in the
common case this is equivalent to checking that a text to be logged has
no RS.

For loggers that produce their own texts, all they have to do is select
a "compact" encoding, as provided by most libraries, or s/LF/SP/g if no
such option is available.

(My apologies, I'm now repeating myself somewhat.)

Nico
--