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

Nico Williams <> Tue, 15 July 2014 06:38 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 05D661A0309 for <>; Mon, 14 Jul 2014 23:38:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.666
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 5SE0PcP108eh for <>; Mon, 14 Jul 2014 23:38:55 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id D595D1B281C for <>; Mon, 14 Jul 2014 23:38:55 -0700 (PDT)
Received: from (localhost []) by (Postfix) with ESMTP id B6FF32C806C; Mon, 14 Jul 2014 23:38:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to;; bh=MQkRSqygvpL/Hn KNoLnu1T+WRxo=; b=ROrjI166mwPWdMt4fKbrLdySibfBPAFbnPy8LLndFxsikZ PS4MGECF5wvPRcefZI3TIie7pyli8YC5grc9DaClhCM/9+pVJCLeFmnPylZ+TSri A768Q6He8isoBOFE3EGOFcfk/Xk88uOPF1oku9Gg1mSRena7EO2/97MnFpcJI=
Received: from localhost ( []) (Authenticated sender: by (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 <>
To: "Joe Hildebrand (jhildebr)" <>
Message-ID: <20140715063853.GE2256@localhost>
References: <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: Paul Hoffman <>, IETF JSON WG <>
Subject: Re: [Json] The text in draft-ietf-json-text-sequence
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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" <> 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.)